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

Side by Side Diff: test/runner/pause_after_load_test.dart

Issue 1654183003: Fix tests that use a 0-length timeout. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 4 years, 10 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 | test/runner/runner_test.dart » ('j') | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 @TestOn("vm") 5 @TestOn("vm")
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:scheduled_test/descriptor.dart' as d; 10 import 'package:scheduled_test/descriptor.dart' as d;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 "Once you're finished, return to this terminal and press Enter." 234 "Once you're finished, return to this terminal and press Enter."
235 ]))); 235 ])));
236 236
237 test.signal(ProcessSignal.SIGTERM); 237 test.signal(ProcessSignal.SIGTERM);
238 test.shouldExit(); 238 test.shouldExit();
239 test.stderr.expect(isDone); 239 test.stderr.expect(isDone);
240 }, testOn: "!windows"); 240 }, testOn: "!windows");
241 241
242 test("disables timeouts", () { 242 test("disables timeouts", () {
243 d.file("test.dart", """ 243 d.file("test.dart", """
244 import 'dart:async';
245
244 import 'package:test/test.dart'; 246 import 'package:test/test.dart';
245 247
246 void main() { 248 void main() {
247 print('loaded test 1!'); 249 print('loaded test 1!');
248 250
249 test("success", () {}, timeout: new Timeout(Duration.ZERO)); 251 test("success", () async {
252 await new Future.delayed(Duration.ZERO);
253 }, timeout: new Timeout(Duration.ZERO));
250 } 254 }
251 """).create(); 255 """).create();
252 256
253 var test = runTest( 257 var test = runTest(
254 ["--pause-after-load", "-p", "dartium", "-n", "success", "test.dart"]); 258 ["--pause-after-load", "-p", "dartium", "-n", "success", "test.dart"]);
255 test.stdout.expect(consumeThrough("loaded test 1!")); 259 test.stdout.expect(consumeThrough("loaded test 1!"));
256 test.stdout.expect(consumeThrough(inOrder([ 260 test.stdout.expect(consumeThrough(inOrder([
257 startsWith("Observatory URL: "), 261 startsWith("Observatory URL: "),
258 "The test runner is paused. Open the dev console in Dartium or the " 262 "The test runner is paused. Open the dev console in Dartium or the "
259 "Observatory and set breakpoints.", 263 "Observatory and set breakpoints.",
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 // our input. 317 // our input.
314 await new Future.delayed(new Duration(seconds: 2)); 318 await new Future.delayed(new Duration(seconds: 2));
315 expect(nextLineFired, isFalse); 319 expect(nextLineFired, isFalse);
316 }); 320 });
317 321
318 test.writeLine(''); 322 test.writeLine('');
319 test.stdout.expect(consumeThrough(contains("+1: All tests passed!"))); 323 test.stdout.expect(consumeThrough(contains("+1: All tests passed!")));
320 test.shouldExit(0); 324 test.shouldExit(0);
321 }); 325 });
322 } 326 }
OLDNEW
« no previous file with comments | « no previous file | test/runner/runner_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698