Skip to content

Commit a240d5c

Browse files
scheglovCommit Queue
authored and
Commit Queue
committed
Fix for extra diagnostics when now all files created at the start.
Change-Id: Icda792b55a1381294c4e3490694fb99ee2c4ca3f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302446 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
1 parent 1c1e11b commit a240d5c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/analysis_server/test/client/completion_driver_test.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,15 @@ abstract class AbstractCompletionDriverTest
7272
Future<List<CompletionSuggestion>> addTestFile(String content,
7373
{int? offset}) async {
7474
driver.addTestFile(content, offset: offset);
75-
await getSuggestions();
75+
76+
// Wait after adding the test file, this might affect diagnostics.
77+
await pumpEventQueue(times: 1000);
78+
7679
// For sanity, ensure that there are no errors recorded for project files
7780
// since that may lead to unexpected results.
7881
_assertNoErrorsInProjectFiles();
82+
83+
await getSuggestions();
7984
return suggestions;
8085
}
8186

0 commit comments

Comments
 (0)