Build/Test Issues

Async MSTest inconclusive result reported as failure

Started by samholder on 4 views

NCrunch 5.21.0.10, local execution, .NET 10, MSTest.TestFramework 3.11.1, req'n'roll

With effective project setting ConsiderInconclusiveTestsAsPassing=True, a synchronous test calling Assert.Inconclusive() passes, but an async test calling it after await Task.Yield() fails. The async result reports AggregateException containing AssertInconclusiveException, with Task.Wait() in the stack.

This also prevents conditional skipping in Reqnroll’s generated async MSTest scenarios.

with this test:

namespace GlobalRegressionTests.Tests {
[TestClass]
public class NCrunchInconclusiveDiagnostics {
[TestMethod]
public void SynchronousInconclusive() {
Assert.Inconclusive("Synchronous inconclusive probe.");
}

[TestMethod]
public async Task AsynchronousInconclusive() {
await Task.Yield();
Assert.Inconclusive("Asynchronous inconclusive probe.");
}
}
}

the first passes and the second fails even with consider inconclusive tests as passing, see screenshot
Screenshot attached by samholder

Post a reply

Log in to reply.