Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Unified Diff: pkg/analysis_server/test/analysis_server_test.dart

Issue 2059503002: Fix more flakiness in pkg tests. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/analysis_server_test.dart
diff --git a/pkg/analysis_server/test/analysis_server_test.dart b/pkg/analysis_server/test/analysis_server_test.dart
index 2fcb0498b673d2dc6c1e6cbd9602fc1d901102c0..b05cf9c189ad7266c63fe62fb7435e5be7124618 100644
--- a/pkg/analysis_server/test/analysis_server_test.dart
+++ b/pkg/analysis_server/test/analysis_server_test.dart
@@ -70,7 +70,7 @@ import "../foo/foo.dart";
''');
Source barSource = bar.createSource();
server.setAnalysisRoots('0', ['/foo', '/bar'], [], {});
- return pumpEventQueue(40).then((_) {
+ return server.onAnalysisComplete.then((_) {
expect(server.statusAnalyzing, isFalse);
// Make sure getAnalysisContext returns the proper context for each.
AnalysisContext fooContext =
@@ -110,7 +110,7 @@ import "../foo/foo.dart";
AnalysisContext barContext = server.getAnalysisContextForSource(barSource);
expect(barContext, isNotNull);
expect(fooContext, isNot(same(barContext)));
- return pumpEventQueue(40).then((_) {
+ return server.onAnalysisComplete.then((_) {
expect(server.statusAnalyzing, isFalse);
// Make sure getAnalysisContext returned the proper context for each.
expect(fooContext.getKindOf(fooSource), SourceKind.LIBRARY);
@@ -236,7 +236,7 @@ import "../foo/foo.dart";
File bar = resourceProvider.newFile('/bar/bar.dart', 'library lib;');
Source barSource = bar.createSource();
server.setAnalysisRoots('0', ['/foo', '/bar'], [], {});
- return pumpEventQueue(500).then((_) {
+ return server.onAnalysisComplete.then((_) {
expect(server.statusAnalyzing, isFalse);
// Make sure getAnalysisContext returns the proper context for each.
AnalysisContext fooContext =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698