Skip to content

Commit

Permalink
Fix more flakiness in pkg tests.
Browse files Browse the repository at this point in the history
I already fixed similar failures.

I recommend eliminating all uses of pumpEventQueue.

BUG=#26556
[email protected]

Review URL: https://codereview.chromium.org/2059503002 .
  • Loading branch information
fsc8000 committed Jun 9, 2016
1 parent 279cb44 commit 705e9e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/analysis_server/test/analysis_server_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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 =
Expand Down

0 comments on commit 705e9e7

Please sign in to comment.