| OLD | NEW |
| 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 Loading... |
| 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); |
| OLD | NEW |