Skip to content

Commit

Permalink
Fix for extra diagnostics when now all files created at the start.
Browse files Browse the repository at this point in the history
Change-Id: Icda792b55a1381294c4e3490694fb99ee2c4ca3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302446
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
  • Loading branch information
scheglov authored and Commit Queue committed May 10, 2023
1 parent 1c1e11b commit a240d5c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/analysis_server/test/client/completion_driver_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,15 @@ abstract class AbstractCompletionDriverTest
Future<List<CompletionSuggestion>> addTestFile(String content,
{int? offset}) async {
driver.addTestFile(content, offset: offset);
await getSuggestions();

// Wait after adding the test file, this might affect diagnostics.
await pumpEventQueue(times: 1000);

// For sanity, ensure that there are no errors recorded for project files
// since that may lead to unexpected results.
_assertNoErrorsInProjectFiles();

await getSuggestions();
return suggestions;
}

Expand Down

0 comments on commit a240d5c

Please sign in to comment.