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

Unified Diff: tests/standalone/io/socket_bind_test.dart

Issue 2546733002: Attempt to reduce flakiness rate of io test (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: tests/standalone/io/socket_bind_test.dart
diff --git a/tests/standalone/io/socket_bind_test.dart b/tests/standalone/io/socket_bind_test.dart
index f701f0c806109cad0db7dfbdad65763f8baa8a3a..9687eda69dfaec7becce75c76a83aa5b0f008ae7 100644
--- a/tests/standalone/io/socket_bind_test.dart
+++ b/tests/standalone/io/socket_bind_test.dart
@@ -4,11 +4,12 @@
import 'dart:async';
import 'dart:io';
-import 'dart:convert';
import 'package:async_helper/async_helper.dart';
import 'package:expect/expect.dart';
+import 'test_utils.dart' show freeIPv4AndIPv6Port;
+
testBindShared(String host, bool v6Only) {
asyncStart();
ServerSocket.bind(
@@ -112,14 +113,6 @@ testListenCloseListenClose(String host) async {
asyncEnd();
}
-Future<int> freeIPv4AndIPv6Port() async {
- var socket =
- await ServerSocket.bind(InternetAddress.ANY_IP_V6, 0, v6Only: false);
- int port = socket.port;
- await socket.close();
- return port;
-}
-
Future retry(Future fun(), {int maxCount: 10}) async {
for (int i = 0; i < maxCount; i++) {
try {

Powered by Google App Engine
This is Rietveld 408576698