| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'test_helper.dart'; | 6 import 'test_helper.dart'; |
| 7 import 'service_test_common.dart'; | 7 import 'service_test_common.dart'; |
| 8 import 'package:observatory/service_io.dart'; | 8 import 'package:observatory/service_io.dart'; |
| 9 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 assert(_lock == null); | 31 assert(_lock == null); |
| 32 _lock = foo(flutterRoot, 'bin', 'cache', 'lockfile'); | 32 _lock = foo(flutterRoot, 'bin', 'cache', 'lockfile'); |
| 33 bool locked = false; | 33 bool locked = false; |
| 34 bool printed = false; | 34 bool printed = false; |
| 35 while (!locked) { | 35 while (!locked) { |
| 36 try { | 36 try { |
| 37 await _lock.lock(); | 37 await _lock.lock(); |
| 38 locked = true; // LINE_B | 38 locked = true; // LINE_B |
| 39 } on FileSystemException { | 39 } on FileSystemException { |
| 40 if (!printed) { | 40 if (!printed) { |
| 41 printTrace('Print path: ${_lock.path}'); | 41 print('Print path: ${_lock.path}'); |
| 42 printStatus('Just another line...'); | 42 print('Just another line...'); |
| 43 printed = true; | 43 printed = true; |
| 44 } | 44 } |
| 45 await new Future<Null>.delayed(const Duration(milliseconds: 50)); | 45 await new Future<Null>.delayed(const Duration(milliseconds: 50)); |
| 46 } | 46 } |
| 47 } | 47 } |
| 48 } | 48 } |
| 49 | 49 |
| 50 Future<Isolate> stepThroughProgram(Isolate isolate) async { | 50 Future<Isolate> stepThroughProgram(Isolate isolate) async { |
| 51 Completer completer = new Completer(); | 51 Completer completer = new Completer(); |
| 52 int pauseEventsSeen = 0; | 52 int pauseEventsSeen = 0; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 79 resumeIsolate, | 79 resumeIsolate, |
| 80 hasStoppedAtBreakpoint, | 80 hasStoppedAtBreakpoint, |
| 81 stepInto, | 81 stepInto, |
| 82 stepInto, | 82 stepInto, |
| 83 stepInto, | 83 stepInto, |
| 84 resumeIsolate, | 84 resumeIsolate, |
| 85 ]; | 85 ]; |
| 86 | 86 |
| 87 main(args) => runIsolateTestsSynchronous(args, tests, | 87 main(args) => runIsolateTestsSynchronous(args, tests, |
| 88 testeeConcurrent: test_code, pause_on_start: true, pause_on_exit: false); | 88 testeeConcurrent: test_code, pause_on_start: true, pause_on_exit: false); |
| OLD | NEW |