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

Side by Side Diff: runtime/observatory/tests/service/isolate_lifecycle_test.dart

Issue 1726773002: Refactor service tests in preparation of running on sky_shell (Closed) Base URL: git@github.com:dart-lang/sdk.git@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
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 // VMOptions=--error_on_bad_type --error_on_bad_override 4 // VMOptions=--error_on_bad_type --error_on_bad_override
5 5
6 import 'dart:async'; 6 import 'dart:async';
7 import 'dart:developer'; 7 import 'dart:developer';
8 import 'dart:isolate' as I; 8 import 'dart:isolate' as I;
9 9
10 import 'package:observatory/service_io.dart'; 10 import 'package:observatory/service_io.dart';
11 import 'package:unittest/unittest.dart'; 11 import 'package:unittest/unittest.dart';
12 12 import 'service_test_common.dart';
13 import 'test_helper.dart'; 13 import 'test_helper.dart';
14 14
15 final spawnCount = 4; 15 final spawnCount = 4;
16 final resumeCount = spawnCount ~/ 2; 16 final resumeCount = spawnCount ~/ 2;
17 final isolates = []; 17 final isolates = [];
18 18
19 void spawnEntry(int i) { 19 void spawnEntry(int i) {
20 } 20 }
21 21
22 Future during() async { 22 Future during() async {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 await isolate.resume(); 124 await isolate.resume();
125 } catch(_) {} 125 } catch(_) {}
126 if (resumesIssued == resumeCount) { 126 if (resumesIssued == resumeCount) {
127 break; 127 break;
128 } 128 }
129 } 129 }
130 await completer.future; 130 await completer.future;
131 }, 131 },
132 132
133 (VM vm) async { 133 (VM vm) async {
134 expect(numPaused(vm), spawnCount + 1 - resumeCount); 134 expect(numPaused(vm), spawnCount + 1 - resumeCount);
135 }, 135 },
136 ]; 136 ];
137 137
138 main(args) async => runVMTests(args, tests, 138 main(args) async => runVMTests(args, tests,
139 testeeConcurrent: during, 139 testeeConcurrent: during,
140 pause_on_exit: true); 140 pause_on_exit: true);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698