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

Side by Side Diff: dart/tests/isolate/mandel_isolate_stream_test.dart

Issue 23679003: Allow isolate/mandel_* tests to run for longer than the default 20 seconds. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | dart/tests/isolate/mandel_isolate_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) 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 library MandelIsolateTest; 5 library MandelIsolateTest;
6 import 'dart:async'; 6 import 'dart:async';
7 import 'dart:isolate'; 7 import 'dart:isolate';
8 import 'dart:math'; 8 import 'dart:math';
9 import '../../pkg/unittest/lib/unittest.dart'; 9 import '../../pkg/unittest/lib/unittest.dart';
10 10
11 const TERMINATION_MESSAGE = -1; 11 const TERMINATION_MESSAGE = -1;
12 const N = 100; 12 const N = 100;
13 const ISOLATES = 20; 13 const ISOLATES = 20;
14 14
15 main() { 15 main() {
16 // Test is really slow in debug builds of the VM.
17 unittestConfiguration.timeout = const Duration(seconds: 480);
16 test("Render Mandelbrot in parallel", () { 18 test("Render Mandelbrot in parallel", () {
17 final state = new MandelbrotState(); 19 final state = new MandelbrotState();
18 state._validated.future.then(expectAsync1((result) { 20 state._validated.future.then(expectAsync1((result) {
19 expect(result, isTrue); 21 expect(result, isTrue);
20 })); 22 }));
21 for (int i = 0; i < min(ISOLATES, N); i++) state.startClient(i); 23 for (int i = 0; i < min(ISOLATES, N); i++) state.startClient(i);
22 }); 24 });
23 } 25 }
24 26
25 27
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 146
145 stream.listen((message) { 147 stream.listen((message) {
146 if (isFirst) { 148 if (isFirst) {
147 isFirst = false; 149 isFirst = false;
148 replyTo = message; 150 replyTo = message;
149 return; 151 return;
150 } 152 }
151 replyTo.add(processLine(message)); 153 replyTo.add(processLine(message));
152 }); 154 });
153 } 155 }
OLDNEW
« no previous file with comments | « no previous file | dart/tests/isolate/mandel_isolate_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698