Skip to content

Integration fixes#70635

Merged
sharwell merged 38 commits intodotnet:mainfrom
sharwell:integration-fixes
Nov 4, 2023
Merged

Integration fixes#70635
sharwell merged 38 commits intodotnet:mainfrom
sharwell:integration-fixes

Conversation

@sharwell
Copy link
Contributor

@sharwell sharwell commented Oct 31, 2023

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

@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 31, 2023
Copy link
Contributor

@CyrusNajmabadi CyrusNajmabadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

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));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 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.

@sharwell sharwell marked this pull request as ready for review November 3, 2023 14:25
@sharwell sharwell requested review from a team as code owners November 3, 2023 14:25
Comment on lines +89 to +90
// It's not known why WaitForCompletionSetAsync fails to stabilize calls to GetCompletionItemsAsync.
await Task.Delay(TimeSpan.FromSeconds(1));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@genlu
Copy link
Member

genlu commented Nov 3, 2023

        options.SetOptionValue(DefaultOptions.ResponsiveCompletionOptionId, false);

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

Copy link
Member

@dibarbet dibarbet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this here to workaround an issue with the debugger? Is there some state thats not clearing after a previous test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's a TryWaitForAsync helper in one of the other services below - could be used here too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another place where we could use the helper (there's more further down as well, but I won't comment them all)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the old integration test project entirely at this point?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I'll do that in the coming week. There is a bunch of support code in RunTests and the build scripts as well.

@sharwell sharwell merged commit 23ddf9f into dotnet:main Nov 4, 2023
@ghost ghost added this to the Next milestone Nov 4, 2023
@sharwell sharwell deleted the integration-fixes branch November 4, 2023 01:44
@RikkiGibson RikkiGibson modified the milestones: Next, 17.9 P2 Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead

Projects

None yet

5 participants