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

Side by Side Diff: pkg/analysis_server/test/analysis/notification_implemented_test.dart

Issue 1379153002: pkg: Eliminate flaky analysis test failure. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: added timeout, changed polling interval to 1ms Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.analysis.notification.implemented; 5 library test.analysis.notification.implemented;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/constants.dart'; 9 import 'package:analysis_server/src/constants.dart';
10 import 'package:analysis_server/src/protocol.dart'; 10 import 'package:analysis_server/src/protocol.dart';
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 await prepareImplementedElements(); 305 await prepareImplementedElements();
306 assertHasImplementedMember('f(_) {} // A'); 306 assertHasImplementedMember('f(_) {} // A');
307 } 307 }
308 308
309 Future waitForImplementedElements() { 309 Future waitForImplementedElements() {
310 Future waitForNotification(int times) { 310 Future waitForNotification(int times) {
311 if (times == 0 || implementedClasses != null) { 311 if (times == 0 || implementedClasses != null) {
312 return new Future.value(); 312 return new Future.value();
313 } 313 }
314 return new Future.delayed( 314 return new Future.delayed(
315 Duration.ZERO, () => waitForNotification(times - 1)); 315 new Duration(milliseconds:1), () => waitForNotification(times - 1));
316 } 316 }
317 return waitForNotification(100); 317 return waitForNotification(30000);
318 } 318 }
319 } 319 }
OLDNEW
« 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