Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DefaultDiagnosticUpdateSourceTests contains flaky tests #45877

Open
333fred opened this issue Jul 10, 2020 · 5 comments
Open

DefaultDiagnosticUpdateSourceTests contains flaky tests #45877

333fred opened this issue Jul 10, 2020 · 5 comments
Assignees
Labels
Milestone

Comments

@333fred
Copy link
Member

333fred commented Jul 10, 2020

The following are known flaky tests within this class:

  • TestDefaultDiagnosticProviderSemantic
  • TestDefaultDiagnosticProviderRemove
  • TestDefaultDiagnosticProviderAll

Details for TestDefaultDiagnosticProviderSemantic

This test has failed 15 times in the last 14 days. Failure message:

Expected:
CS0246
Actual:
CS0246,
CS0246
Differences:
    CS0246,
++> CS0246

Expected: True
Actual:   False

Some examples of failures:
https://dev.azure.com/dnceng/public/_build/results?buildId=724700&view=ms.vss-test-web.build-test-results-tab
https://dev.azure.com/dnceng/public/_build/results?buildId=721954&view=ms.vss-test-web.build-test-results-tab
https://dev.azure.com/dnceng/public/_build/results?buildId=718388&view=ms.vss-test-web.build-test-results-tab

One possibly notable detail: failures seem to take ~2.2 seconds for the test to run, successes take under .5 seconds for the most part.

Details for TestDefaultDiagnosticProviderRemove

Builds

Build Pull Request Test Failure Count
#739651 #46176 1
#739718 #46179 1
#739874 #46183 1
#739896 #45800 1
#740061 #46194 1
#740083 #46138 1
#740155 #45806 1
#740370 Rolling 1
#740378 Rolling 1
#740397 Rolling 1
#740404 #46189 1
#740484 #44447 1
#740543 #46199 1
#740831 Rolling 1
#741237 Rolling 1
#741316 Rolling 1
#741604 #46219 1
#741683 #46038 1

Configurations

  • Windows Desktop Debug Test32
  • Windows Desktop Debug Test64
  • Windows Desktop Release Test32
  • Windows Desktop Release Test64
  • Windows Desktop Spanish

Details for TestDefaultDiagnosticProviderAll

Public Async Function TestDefaultDiagnosticProviderAll() As Task

Example build: https://dev.azure.com/dnceng/public/_build/results?buildId=749582&view=ms.vss-test-web.build-test-results-tab&runId=23240534&resultId=202015&paneView=debug

Xunit log:

Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics.DefaultDiagnosticUpdateSourceTests.TestDefaultDiagnosticProviderAll [STARTING]
      
      Expected:
      CS1002
      CS0246
      Actual:
      CS1002
      CS1002
      CS0246
      CS0246
      Differences:
          CS1002
      ++> CS1002
          CS0246
      ++> CS0246
      
      Expected: True
      Actual:   False
      Stack Trace:
        /_/src/Test/Utilities/Portable/Assert/AssertEx.cs(442,0): at Roslyn.Test.Utilities.AssertEx.SetEqual[T](IEnumerable`1 expected, IEnumerable`1 actual, IEqualityComparer`1 comparer, String message, String itemSeparator, Func`2 itemInspector)
        /_/src/Test/Utilities/Portable/Assert/AssertEx.cs(425,0): at Roslyn.Test.Utilities.AssertEx.SetEqual(IEnumerable`1 expected, IEnumerable`1 actual, IEqualityComparer`1 comparer, String message, String itemSeparator, Func`2 itemInspector)
        /_/src/VisualStudio/Core/Test/Diagnostics/DefaultDiagnosticUpdateSourceTests.vb(177,0): at Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics.DefaultDiagnosticUpdateSourceTests.VB$StateMachine_4_TestDefaultDiagnosticProviderAll.MoveNext()
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics.DefaultDiagnosticUpdateSourceTests.TestDefaultDiagnosticProviderAll [FINISHED] Time: 1.6519875s
@333fred 333fred added Area-IDE Test Test failures in roslyn-CI Flaky Disabled Test labels Jul 10, 2020
@mavasani mavasani self-assigned this Jul 10, 2020
@mavasani
Copy link
Contributor

I'll take a look.

@vatsalyaagrawal vatsalyaagrawal added this to the 16.8 milestone Jul 13, 2020
@mavasani mavasani assigned sharwell and unassigned mavasani Jul 28, 2020
@mavasani
Copy link
Contributor

Assigning to @sharwell based on the investigations in #46255

@sharwell sharwell changed the title TestDefaultDiagnosticProviderSemantic is flaky DefaultDiagnosticUpdateSourceTests contains flaky tests Jul 29, 2020
@sharwell
Copy link
Member

sharwell commented Jul 29, 2020

@mavasani This doesn't appear to be the same issue as #46255. ☹️

@sharwell
Copy link
Member

This seems to affect this line:

return diagnostics.Add(ErrorCode.ERR_SingleTypeNameNotFound, location, whereText);

It feels like parallel binding of the same identifier (optimistic initialization) is resulting in a case where one of the side effects (error reporting) is observed from both the path that wins the initialization and the one that doesn't.

@jinujoseph jinujoseph modified the milestones: 16.9, 16.10 Mar 28, 2021
@jinujoseph jinujoseph modified the milestones: 16.10, Backlog Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants