microsoft / microsoft/vs-threading
Unstable test: ExecuteAsync_Contested
Open
Nobody has claimed this yet.
test bug
- Dominant language
- C#
- Stars
- 1k
- Forks
- 160
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 28
Description
The ExecuteAsync_Contested test failed on AppVeyor with the following output:
ExecuteAsync_Contested(mode: NotAllowed) [FAIL]
System.Threading.Tasks.TaskCanceledException : A task was canceled.
Stack Trace:
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
src\Microsoft.VisualStudio.Threading.Tests\ReentrantSemaphoreTestBase.cs(164,0): at ReentrantSemaphoreTestBase.<<ExecuteAsync_Contested>b__17_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
src\Microsoft.VisualStudio.Threading.Tests\TestBase.cs(310,0): at Microsoft.VisualStudio.Threading.Tests.TestBase.<>c__DisplayClass23_1.<<ExecuteOnDispatcher>b__2>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
src\Microsoft.VisualStudio.Threading.Tests\TestBase.cs(326,0): at Microsoft.VisualStudio.Threading.Tests.TestBase.<>c__DisplayClass23_0.<ExecuteOnDispatcher>b__0()
src\Microsoft.VisualStudio.Threading.Tests\TestBase.cs(334,0): at Microsoft.VisualStudio.Threading.Tests.TestBase.ExecuteOnDispatcher(Func`1 action, Boolean staRequired)
src\Microsoft.VisualStudio.Threading.Tests\ReentrantSemaphoreTestBase.cs(637,0): at ReentrantSemaphoreTestBase.ExecuteOnDispatcher(Func`1 test)
src\Microsoft.VisualStudio.Threading.Tests\ReentrantSemaphoreTestBase.cs(138,0): at ReentrantSemaphoreTestBase.ExecuteAsync_Contested(ReentrancyMode mode)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ReentrantSemaphoreTestBase.cs at ExecuteAsync_Contested and the reported line 164, then inspect the ExecuteOnDispatcher calls in TestBase.cs at the listed stack-trace locations. Reproduce the AppVeyor failure if possible and trace why TaskCanceledException occurs; done means the test no longer fails intermittently while preserving its intended coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100