testfx: Async tests which use Assert.Inconclusive report as Error

Description

Async tests which use Assert.Inconclusive report as Error

Steps to reproduce

   [TestMethod]
        public void TestInconclusiveSync()
        {

            Assert.Inconclusive("This will report as skipped");
        }

        [TestMethod]
        public async Task TestInconclusiveAsync()
        {

            Assert.Inconclusive("This will report as error");
        }

v1.1.18

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 16 (13 by maintainers)

Commits related to this issue

Most upvoted comments

@jthelin : Sorry about that. The builds are failing because of service issues. Should be up this week hopefully.

Confirming this issue is fixed for me now that v1.2.0 nuget packages published.

Thanks for confirming @jessehouwing

I should be able to use a local dev build for the moment, when I find a machine with UWP SDK installed… 😉

Oops - my bad. I just noticed the “latest” build i was using from myget is 0919 [and not 0929 as i had thought] so it won’t actually contain the #277 code fix.

So the real problem is that no “daily” builds have been produced in the last 10 days.

https://dotnet.myget.org/feed/mstestv2/package/nuget/MSTest.TestFramework

Could someone give the build hamsters a poke to wake them up?

I’ll add that locally. The test should be easy to add and check.

Just checked and it works:

[TestMethodV1]
        public void TestMethodInfoInvokeWaitAsyncShouldHandleThrowAssertInconclusive()
        {
            DummyTestClass.DummyAsyncTestMethodBody = () => Task.Run(async () =>
            {
                await Task.Delay(1);
                UTF.Assert.Inconclusive("Assert_Inconclusive_Async");
            });
            var asyncMethodInfo = typeof(DummyTestClass).GetMethod("DummyAsyncTestMethod");

            var method = new TestMethodInfo(
                asyncMethodInfo,
                this.testClassInfo,
                this.testMethodOptions);

            var result = method.Invoke(null);

            Assert.AreEqual(UTF.UnitTestOutcome.Inconclusive, result.Outcome);
        }