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

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

Issue 1818443002: Add debugging output to crash_dump_test to help track down timeout. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 4
5 library crash_dump_test; 5 library crash_dump_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io'; 9 import 'dart:io';
10 import 'package:observatory/service_io.dart'; 10 import 'package:observatory/service_io.dart';
11 11
12 import 'test_helper.dart'; 12 import 'test_helper.dart';
13 13
14 Future warmup() async { 14 Future warmup() async {
15 print('hi'); 15 print('hi');
16 } 16 }
17 17
18 var tests = [ 18 var tests = [
19 (VM vm) async { 19 (VM vm) async {
20 HttpClient client = new HttpClient(); 20 HttpClient client = new HttpClient();
21 print('Requesting uri ${serviceHttpAddress}/_getCrashDump');
21 var request = 22 var request =
22 await client.getUrl(Uri.parse('$serviceHttpAddress/_getCrashDump')); 23 await client.getUrl(Uri.parse('$serviceHttpAddress/_getCrashDump'));
23 var response = await request.close(); 24 var response = await request.close();
25 print('Received response');
24 Completer completer = new Completer(); 26 Completer completer = new Completer();
25 StringBuffer sb = new StringBuffer(); 27 StringBuffer sb = new StringBuffer();
26 response.transform(UTF8.decoder).listen((chunk) { 28 response.transform(UTF8.decoder).listen((chunk) {
27 sb.write(chunk); 29 sb.write(chunk);
28 }, onDone: () => completer.complete(sb.toString())); 30 }, onDone: () => completer.complete(sb.toString()));
29 var responseString = await completer.future; 31 var responseString = await completer.future;
30 JSON.decode(responseString); 32 JSON.decode(responseString);
31 } 33 }
32 ]; 34 ];
33 35
34 main(args) async => runVMTests(args, tests, testeeBefore:warmup); 36 main(args) async => runVMTests(args, tests, testeeBefore:warmup);
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