Conversation
| object? obj = null; | ||
| shell.PostExecCommand(cmdGroup, (uint)cmdID, (uint)cmdExecOpt, ref obj); | ||
| // It's not known why WaitForCompletionSetAsync fails to stabilize calls to IsCompletionActive. | ||
| await Task.Delay(TimeSpan.FromSeconds(1)); |
There was a problem hiding this comment.
📝 The most flaky tests in this pull request are all failing in calls that assert the result of IsCompletionActiveAsync. We should work with editor team to make this a specific wait instead of an arbitrary constant.
Closes dotnet#35965 Closes dotnet#36763 Closes dotnet#37689
Closes dotnet#38301 Closes dotnet#45234 Closes dotnet#70582
Related to dotnet#35965 Related to dotnet#19526
Consistently restore state to a specific environment at the start of the test, and condition the expected output based on that environment. Possibly related to dotnet#57701
9f2fe67 to
74453d3
Compare
74453d3 to
9075f85
Compare
| // It's not known why WaitForCompletionSetAsync fails to stabilize calls to GetCompletionItemsAsync. | ||
| await Task.Delay(TimeSpan.FromSeconds(1)); |
There was a problem hiding this comment.
📝 Added a delay here as well. It looks like ICompletionBroker is introducing significant instability in the overall testing. We should work with the editor to stabilize these APIs.
There was a problem hiding this comment.
yea, we already switched to another API based on Kayle's suggestion, but it didn't help
https://github.com/dotnet/roslyn/pull/70578/files
There's also this option in editor, we should check with Kayle to see if we need to set it too update: nvm, the default is false |
dibarbet
left a comment
There was a problem hiding this comment.
A couple random nits, feel free to take or ignore. I generally only skimmed the actual test files. Nothing seemed egregiously off!
| var dte = await TestServices.Shell.GetRequiredGlobalServiceAsync<SDTE, EnvDTE.DTE>(HangMitigatingCancellationToken); | ||
| if (dte.Debugger.CurrentMode != EnvDTE.dbgDebugMode.dbgDesignMode) | ||
| { | ||
| dte.Debugger.TerminateAll(); |
There was a problem hiding this comment.
Is this here to workaround an issue with the debugger? Is there some state thats not clearing after a previous test?
There was a problem hiding this comment.
If a test fails during a debugging session, it will not stop the debugger before exiting the test method. This method cleans up from whatever state the test completed in so the failure is isolated to just the test with the assertion failure.
| while (true) | ||
| { | ||
| cancellationToken.ThrowIfCancellationRequested(); | ||
| if (await TryGetDialogAsync(cancellationToken) is null) |
There was a problem hiding this comment.
there's a TryWaitForAsync helper in one of the other services below - could be used here too.
There was a problem hiding this comment.
Maybe. I'm not thrilled with the current behavior but it matches the old code so left it for now.
| while (true) | ||
| { | ||
| cancellationToken.ThrowIfCancellationRequested(); | ||
| if (await TryGetDialogAsync(cancellationToken) is null) |
There was a problem hiding this comment.
Another place where we could use the helper (there's more further down as well, but I won't comment them all)
There was a problem hiding this comment.
Yeah, every dialog helper has the same code.
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| // See the LICENSE file in the project root for more information. | ||
|
|
||
| #nullable disable |
There was a problem hiding this comment.
Can we remove the old integration test project entirely at this point?
There was a problem hiding this comment.
Yes I'll do that in the coming week. There is a bunch of support code in RunTests and the build scripts as well.
Submitting to CI to catch cases I might have missed during the port. Will review and rebase with updates before marking reading for review.
Closes #20371
Closes #25814
Closes #35965
Closes #36763
Closes #37689
Closes #38301
Closes #40160
Closes #45234
Closes #46027
Closes #57423
Closes #70582