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

Side by Side Diff: pkg/watcher/test/no_subscription_test.dart

Issue 26398002: Bump wait time for watcher test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | Annotate | Revision Log
« 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:scheduled_test/scheduled_test.dart'; 7 import 'package:scheduled_test/scheduled_test.dart';
8 import 'package:watcher/watcher.dart'; 8 import 'package:watcher/watcher.dart';
9 9
10 import 'utils.dart'; 10 import 'utils.dart';
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 expect(event.type, equals(ChangeType.ADD)); 50 expect(event.type, equals(ChangeType.ADD));
51 expect(event.path, endsWith("added.txt")); 51 expect(event.path, endsWith("added.txt"));
52 completer.complete(); 52 completer.complete();
53 })); 53 }));
54 }); 54 });
55 55
56 // The watcher will have been cancelled and then resumed in the middle of 56 // The watcher will have been cancelled and then resumed in the middle of
57 // its pause between polling loops. That means the second scan to skip 57 // its pause between polling loops. That means the second scan to skip
58 // what changed while we were unsubscribed won't happen until after that 58 // what changed while we were unsubscribed won't happen until after that
59 // delay is done. Wait long enough for that to happen. 59 // delay is done. Wait long enough for that to happen.
60 schedule(() => new Future.delayed(watcher.pollingDelay * 2)); 60 //
61 // We're doing * 4 here because that seems to give the slower bots enough
62 // time for this to complete.
63 schedule(() => new Future.delayed(watcher.pollingDelay * 4));
61 64
62 // And add a third file. 65 // And add a third file.
63 writeFile("added.txt"); 66 writeFile("added.txt");
64 67
65 // Wait until we get an event for the third file. 68 // Wait until we get an event for the third file.
66 schedule(() => completer.future); 69 schedule(() => completer.future);
67 70
68 schedule(() { 71 schedule(() {
69 subscription.cancel(); 72 subscription.cancel();
70 }); 73 });
71 }); 74 });
72 } 75 }
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