| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 | 5 |
| 6 import "package:expect/expect.dart"; | 6 import "package:expect/expect.dart"; |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 | 9 |
| 10 const int NUM_SERVERS = 10; | 10 const int NUM_SERVERS = 10; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 print(result.stdout); | 46 print(result.stdout); |
| 47 print(" stderr:"); | 47 print(" stderr:"); |
| 48 print(result.stderr); | 48 print(result.stderr); |
| 49 Expect.fail('Client subprocess exit code: ${result.exitCode}'); | 49 Expect.fail('Client subprocess exit code: ${result.exitCode}'); |
| 50 } | 50 } |
| 51 }); | 51 }); |
| 52 } | 52 } |
| 53 | 53 |
| 54 runClient(int port) { | 54 runClient(int port) { |
| 55 var client = new HttpClient(); | 55 var client = new HttpClient(); |
| 56 client.get(InternetAddress.LOOPBACK_IP_V4, port, "/") | 56 client.get('127.0.0.1', port, "/") |
| 57 .then((request) => request.close()) | 57 .then((request) => request.close()) |
| 58 .then((response) => response.listen((data) {}, | 58 .then((response) => response.listen((data) {}, |
| 59 onDone: () => print('SUCCESS'))); | 59 onDone: () => print('SUCCESS'))); |
| 60 } | 60 } |
| OLD | NEW |