Repository navigation
Closed
Description
Several tests from System.Threading.Tasks.Extensions are hanging when running the test suite on Browser WebAssembly.
It is suspected that "incomplete" tests in xharness lead to an infinite loop in the threadpool pump loop. #38815 (comment)
[SKIP] System.Threading.Tasks.Tests.AsyncValueTaskMethodBuilderTests.AwaitTasksAndValueTasks_InTaskAndValueTaskMethods
[SKIP] System.Threading.Tasks.Tests.AsyncValueTaskMethodBuilderTests.Generic_ConcurrentBuilders_WorkCorrectly
[SKIP] System.Threading.Tasks.Tests.AsyncValueTaskMethodBuilderTests.NonGeneric_ConcurrentBuilders_WorkCorrectly
[SKIP] System.Threading.Tasks.Sources.Tests.ManualResetValueTaskSourceTests.SetException_AfterOnCompleted_ResultAvailableAsynchronously
[SKIP] System.Threading.Tasks.Sources.Tests.ManualResetValueTaskSourceTests.AsyncEnumerable_Success
[SKIP] System.Threading.Tasks.Sources.Tests.ManualResetValueTaskSourceTests.SetResult_AfterOnCompleted_ResultAvailableAsynchronously
[SKIP] System.Threading.Tasks.Sources.Tests.ManualResetValueTaskSourceTests.ReuseInstanceWithResets_Success
[SKIP] System.Threading.Tasks.Tests.ValueTaskTests.Generic_CreateFromValueTaskSource_Canceled(sync: False)
[SKIP] System.Threading.Tasks.Tests.ValueTaskTests.Generic_CreateFromValueTaskSource_Success(sync: False)
[SKIP] System.Threading.Tasks.Tests.ValueTaskTests.Generic_CreateFromValueTaskSource_Faulted(sync: False)
[SKIP] System.Threading.Tasks.Tests.ValueTaskTests.Generic_CreateFromTask_Await_Normal
[SKIP] System.Threading.Tasks.Tests.ValueTaskTests.Generic_CreateFromValueTaskSource_Await_Normal
[SKIP] System.Threading.Tasks.Tests.ValueTaskTests.CreateFromValueTaskSource_Await_Normal
[SKIP] System.Threading.Tasks.Tests.ValueTaskTests.Generic_Awaiter_ContinuesOnCapturedContext
[SKIP] System.Threading.Tasks.Tests.ValueTaskTests.NonGeneric_CreateFromTask_Await_Normal
[SKIP] System.Threading.Tasks.Tests.ValueTaskTests.NonGeneric_ConfiguredAwaiter_ContinuesOnCapturedContext
[SKIP] System.Threading.Tasks.Tests.ValueTaskTests.NonGeneric_CreateFromValueTaskSource_Canceled(sync: False)
[SKIP] System.Threading.Tasks.Tests.ValueTaskTests.NonGeneric_CreateFromValueTaskSource_Faulted(sync: False)
[SKIP] System.Threading.Tasks.Tests.ValueTaskTests.NonGeneric_CreateFromValueTaskSource_Success(sync: False)
[SKIP] System.Threading.Tasks.Tests.ValueTaskTests.Generic_ConfiguredAwaiter_ContinuesOnCapturedContext
Activity
marek-safar commentedon Jul 31, 2020
Is this xharness issue?
/cc @akoeplinger
akoeplinger commentedon Aug 3, 2020
I looked at it and yeah it's kind of an xharness issue. We only pump the threadpool but we don't pump the timer queue inside the xharness runner, so in the case of
Task.Delay()it'll schedule a callback on the timer queue and that will never happen which leads to the infinite loop waiting for the test to finish.I'll know how to fix it.
WASM: Add pumping of timer queue to ThreadlessXunitTestRunner
WASM: Add pumping of timer queue to ThreadlessXunitTestRunner (#290)
WASM: Pump timer queue in xharness when running unit tests
WASM: Pump timer queue in xharness when running unit tests (#40278)
WASM: Pump timer queue in xharness when running unit tests (dotnet#40278