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

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

Issue 1234203003: Add prints to help diagnose flaky async_step_test failure. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | no next file » | 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) 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=--compile_all --error_on_bad_type --error_on_bad_override --verbos e_debug 4 // VMOptions=--compile_all --error_on_bad_type --error_on_bad_override --verbos e_debug
5 5
6 import 'package:observatory/service_io.dart'; 6 import 'package:observatory/service_io.dart';
7 import 'package:unittest/unittest.dart'; 7 import 'package:unittest/unittest.dart';
8 import 'test_helper.dart'; 8 import 'test_helper.dart';
9 import 'dart:developer'; 9 import 'dart:developer';
10 10
(...skipping 10 matching lines...) Expand all
21 testMain() { 21 testMain() {
22 // With two runs of doAsync floating around, async step should only cause 22 // With two runs of doAsync floating around, async step should only cause
23 // us to stop in the run we started in. 23 // us to stop in the run we started in.
24 doAsync(false); 24 doAsync(false);
25 doAsync(true); 25 doAsync(true);
26 } 26 }
27 27
28 28
29 asyncStep(Isolate isolate) async { 29 asyncStep(Isolate isolate) async {
30 var event = isolate.pauseEvent; 30 var event = isolate.pauseEvent;
31 print("Pause event is $event");
31 expect(event, isNotNull); 32 expect(event, isNotNull);
32 33
33 // 1. Set breakpoint for the continuation and resume the isolate. 34 // 1. Set breakpoint for the continuation and resume the isolate.
34 Instance continuation = event.asyncContinuation; 35 Instance continuation = event.asyncContinuation;
35 print("Async continuation is $continuation"); 36 print("Async continuation is $continuation");
37 if (continuation == null) {
38 print(await isolate.getStack());
39 }
36 expect(continuation.isClosure, isTrue); 40 expect(continuation.isClosure, isTrue);
37 41
38 var bpt = await isolate.addBreakOnActivation(continuation); 42 var bpt = await isolate.addBreakOnActivation(continuation);
43 print("Async step to $bpt");
39 expect(bpt is Breakpoint, isTrue); 44 expect(bpt is Breakpoint, isTrue);
40 print("Async step to $bpt");
41 45
42 await isolate.resume(); 46 await isolate.resume();
43 await hasStoppedAtBreakpoint(isolate); 47 await hasStoppedAtBreakpoint(isolate);
48 print("Big step to: ${isolate.pauseEvent}");
44 49
45 // 2. Step past the state-machine dispatch. 50 // 2. Step past the state-machine dispatch.
46 await isolate.stepOver(); 51 await isolate.stepOver();
47 await hasStoppedAtBreakpoint(isolate); 52 await hasStoppedAtBreakpoint(isolate);
53 print("Small step to: ${isolate.pauseEvent}");
48 } 54 }
49 55
50 var tests = [ 56 var tests = [
51 hasStoppedAtBreakpoint, 57 hasStoppedAtBreakpoint,
52 stoppedAtLine(15), 58 stoppedAtLine(15),
53 asyncStep, 59 asyncStep,
54 stoppedAtLine(16), 60 stoppedAtLine(16),
55 asyncStep, 61 asyncStep,
56 stoppedAtLine(17), 62 stoppedAtLine(17),
57 resumeIsolate, 63 resumeIsolate,
58 ]; 64 ];
59 65
60 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); 66 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698