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

Side by Side Diff: pkg/scheduled_test/test/scheduled_process_test.dart

Issue 13327009: Increase the default test timeout for scheduled tests on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 scheduled_process_test; 5 library scheduled_process_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:pathos/path.dart' as path; 10 import 'package:pathos/path.dart' as path;
11 import 'package:scheduled_test/scheduled_process.dart'; 11 import 'package:scheduled_test/scheduled_process.dart';
12 import 'package:scheduled_test/scheduled_test.dart'; 12 import 'package:scheduled_test/scheduled_test.dart';
13 import 'package:scheduled_test/src/mock_clock.dart' as mock_clock; 13 import 'package:scheduled_test/src/mock_clock.dart' as mock_clock;
14 14
15 import 'metatest.dart'; 15 import 'metatest.dart';
16 import 'utils.dart'; 16 import 'utils.dart';
17 17
18 void main() { 18 void main() {
19 metaSetUp(() {
20 // The windows bots are very slow, so we increase the default timeout.
21 if (Platform.operatingSystem != "windows") return;
22 currentSchedule.timeout = new Duration(seconds: 10);
23 });
24
19 expectTestsPass("a process must have kill() or shouldExit() called", () { 25 expectTestsPass("a process must have kill() or shouldExit() called", () {
20 var errors; 26 var errors;
21 test('test 1', () { 27 test('test 1', () {
22 currentSchedule.onException.schedule(() { 28 currentSchedule.onException.schedule(() {
23 errors = currentSchedule.errors; 29 errors = currentSchedule.errors;
24 }); 30 });
25 31
26 startDartProcess('print("hello!");'); 32 startDartProcess('print("hello!");');
27 }); 33 });
28 34
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 388
383 currentSchedule.onComplete.schedule(() { 389 currentSchedule.onComplete.schedule(() {
384 return tempDir.catchError((_) => null).then((dir) { 390 return tempDir.catchError((_) => null).then((dir) {
385 if (dir == null) return; 391 if (dir == null) return;
386 return new Directory(dir).delete(recursive: true); 392 return new Directory(dir).delete(recursive: true);
387 }); 393 });
388 }, 'clean up temp dir'); 394 }, 'clean up temp dir');
389 395
390 return new ScheduledProcess.start(dartExecutable, ['--checked', dartPath]); 396 return new ScheduledProcess.start(dartExecutable, ['--checked', dartPath]);
391 } 397 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698