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

Side by Side Diff: tests/standalone/io/http_bind_test.dart

Issue 2709013004: Adjust test to run on no-IPv6 machines, update status file (Closed)
Patch Set: Created 3 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 | tests/standalone/standalone.status » ('j') | 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) 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:io'; 6 import 'dart:io';
7 import 'dart:convert'; 7 import 'dart:convert';
8 8
9 import 'package:async_helper/async_helper.dart'; 9 import 'package:async_helper/async_helper.dart';
10 import 'package:expect/expect.dart'; 10 import 'package:expect/expect.dart';
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 await singleRequest(host, port, 502); 52 await singleRequest(host, port, 502);
53 await server2.close(); 53 await server2.close();
54 54
55 await server1Request.future; 55 await server1Request.future;
56 await server2Request.future; 56 await server2Request.future;
57 57
58 asyncEnd(); 58 asyncEnd();
59 } 59 }
60 60
61 void main() { 61 void main() {
62 for (var host in ['127.0.0.1', '::1']) { 62 // Please don't change this to use await/async.
63 testBindShared(host, false); 63 asyncStart();
64 testBindShared(host, true); 64 supportsIPV6().then((ok) {
65 var addresses = ['127.0.0.1'];
66 if (ok) {
67 addresses.add('::1');
68 }
69 var futures = [];
70 for (var host in addresses) {
71 futures.add(testBindShared(host, false));
72 futures.add(testBindShared(host, true));
73 }
74 Future.wait(futures).then((_) => asyncEnd());
75 });
76 }
77
78 bool supportsIPV6() async {
79 try {
80 var socket = await ServerSocket.bind('::1', 0);
81 await socket.close();
82 return true;
83 } catch (e) {
84 print(e);
85 return false;
65 } 86 }
66 } 87 }
OLDNEW
« no previous file with comments | « no previous file | tests/standalone/standalone.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698