microsoft / microsoft/vs-threading

Unstable tests

Open
#1,041 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.