Skip to content

GenerateMethodUsingTypeConstraint_InstantiatedGenerics is flaky #41671

@RikkiGibson

Description

@RikkiGibson

Originally raised in #41659 (comment)
Failing run: https://dev.azure.com/dnceng/public/_build/results?buildId=519808&view=ms.vss-test-web.build-test-results-tab&runId=16435318&resultId=155382&paneView=debug

System.AggregateException : One or more errors occurred.\r\n---- System.InvalidOperationException : WaitAndGetResult cannot be called from a thread pool thread.
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at Microsoft.CodeAnalysis.Editor.UnitTests.Diagnostics.AbstractCrossLanguageUserDiagnosticTest.VB$StateMachine_10_GetDiagnosticAndFixesAsync.MoveNext() in /_/src/EditorFeatures/Test2/Diagnostics/AbstractCrossLanguageUserDiagnosticTest.vb:line 137
--- 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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.CodeAnalysis.Editor.UnitTests.Diagnostics.AbstractCrossLanguageUserDiagnosticTest.VB$StateMachine_8_GetDiagnosticAndFixAsync.MoveNext() in /_/src/EditorFeatures/Test2/Diagnostics/AbstractCrossLanguageUserDiagnosticTest.vb:line 112
--- 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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.CodeAnalysis.Editor.UnitTests.Diagnostics.AbstractCrossLanguageUserDiagnosticTest.VB$StateMachine_6_TestAsync.MoveNext() in /_/src/EditorFeatures/Test2/Diagnostics/AbstractCrossLanguageUserDiagnosticTest.vb:line 59
--- 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 System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Microsoft.CodeAnalysis.Editor.UnitTests.Diagnostics.GenerateMethod.GenerateMethodCrossLanguageTests.VB$StateMachine_21_GenerateMethodUsingTypeConstraint_InstantiatedGenerics.MoveNext() in /_/src/EditorFeatures/Test2/Diagnostics/GenerateFromUsage/GenerateMethodCrossLanguageTests.vb:line 1079
--- 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)
--- 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)
--- 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)
----- Inner Stack Trace -----
   at Roslyn.Utilities.TaskExtensions.WaitAndGetResult[T](Task`1 task, CancellationToken cancellationToken) in /_/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Utilities/TaskExtensions.cs:line 72
   at Microsoft.CodeAnalysis.Shared.Extensions.ITypeSymbolExtensions.ReplaceTypeParameterBasedOnTypeConstraintVisitor.<>c__DisplayClass10_0.<VisitTypeParameter>b__1(ITypeSymbol ct) in /_/src/Workspaces/Core/Portable/Shared/Extensions/ITypeSymbolExtensions.ReplaceTypeParameterBasedOnTypeConstraintVisitor.cs:line 104
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Microsoft.CodeAnalysis.Shared.Extensions.ITypeSymbolExtensions.ReplaceTypeParameterBasedOnTypeConstraintVisitor.VisitTypeParameter(ITypeParameterSymbol symbol) in /_/src/Workspaces/Core/Portable/Shared/Extensions/ITypeSymbolExtension

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions