microsoft / microsoft/vs-threading
Unstable tests
Open
Nobody has claimed this yet.
test bug
- Dominant language
- C#
- Stars
- 1k
- Forks
- 160
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 28
Description
We should investigate the test failures from the tests disabled in #1040.
SwitchToMainThreadShouldNotLeakJoinableTaskWhenGetResultRunsFirst
Assert.Null() Failure
Expected: (null)
Actual: Object { }
at JoinableTaskTests.SwitchToMainThreadShouldNotLeakJoinableTaskWhenGetResultRunsFirst() in D:\a\1\s\test\Microsoft.VisualStudio.Threading.Tests\JoinableTaskTests.cs:line 3462
SwitchToMainThreadMemoryLeak
Assert.Equal() Failure
Expected: TestPassed
Actual: TestFailed
Stack trace
at TestUtilities.<>c.<ExecuteInIsolationAsync>b__8_3(Task`1 t) in D:\a\1\s\test\Microsoft.VisualStudio.Threading.Tests\TestUtilities.cs:line 248
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- 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)
at TestBase.ExecuteInIsolation(String testMethodName) in D:\a\1\s\test\Microsoft.VisualStudio.Threading.Tests\TestBase.cs:line 362
at JoinableTaskTests.SwitchToMainThreadMemoryLeak() in D:\a\1\s\test\Microsoft.VisualStudio.Threading.Tests\JoinableTaskTests.cs:line 3161
SwitchToMainThreadMemoryLeakWithCancellationToken
Assert.Equal() Failure
Expected: TestPassed
Actual: TestFailed
Stack trace
at TestUtilities.<>c.<ExecuteInIsolationAsync>b__8_3(Task`1 t) in D:\a\1\s\test\Microsoft.VisualStudio.Threading.Tests\TestUtilities.cs:line 248
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- 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)
at TestBase.ExecuteInIsolation(String testMethodName) in D:\a\1\s\test\Microsoft.VisualStudio.Threading.Tests\TestBase.cs:line 362
at JoinableTaskTests.SwitchToMainThreadMemoryLeakWithCancellationToken()
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 the disabled tests named in #1040 in test/Microsoft.VisualStudio.Threading.Tests/JoinableTaskTests.cs, then run them to reproduce the failures. Read the referenced TestUtilities.cs and TestBase.cs isolation paths, along with the failure locations at lines 3462 and 3161. Done means the three tests pass reliably without the reported assertion or isolation failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100