Skip to content

Commit

Permalink
Merge pull request #61413 from CyrusNajmabadi/extractMethodWait
Browse files Browse the repository at this point in the history
Wait for async operations to complete before proceeding
  • Loading branch information
CyrusNajmabadi authored May 19, 2022
2 parents 2b12d49 + 9800ffe commit 2fd5895
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public void SimpleExtractMethod()
VisualStudio.Editor.PlaceCaret("Console", charsOffset: -1);
VisualStudio.Editor.PlaceCaret("World", charsOffset: 4, extendSelection: true);
VisualStudio.ExecuteCommand(WellKnownCommandNames.Refactor_ExtractMethod);
VisualStudio.Workspace.WaitForAsyncOperations(Helper.HangMitigatingTimeout, FeatureAttribute.ExtractMethod);

var expectedMarkup = @"
using System;
Expand Down Expand Up @@ -91,6 +92,7 @@ public void ExtractMethodWithTriviaSelected()
VisualStudio.Editor.PlaceCaret("int result", charsOffset: -8);
VisualStudio.Editor.PlaceCaret("result;", charsOffset: 4, extendSelection: true);
VisualStudio.ExecuteCommand(WellKnownCommandNames.Refactor_ExtractMethod);
VisualStudio.Workspace.WaitForAsyncOperations(Helper.HangMitigatingTimeout, FeatureAttribute.ExtractMethod);

var expectedMarkup = @"
using System;
Expand Down

0 comments on commit 2fd5895

Please sign in to comment.