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

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

Issue 2566273007: Fix flaky timeouts of socket_ipv6_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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/socket_ipv6_test.dart
diff --git a/tests/standalone/io/socket_ipv6_test.dart b/tests/standalone/io/socket_ipv6_test.dart
index 54f8a5018b1ea478065c0653c4e44b94e6f4ffa2..d4af582879a28bc99476c9ed82a3e68dc383a37e 100644
--- a/tests/standalone/io/socket_ipv6_test.dart
+++ b/tests/standalone/io/socket_ipv6_test.dart
@@ -56,7 +56,11 @@ void testIPv6toIPv4() {
server.listen((socket) {
throw "Unexpected socket";
});
- Socket.connect(clientAddr.first, server.port).catchError((e) {
+ Socket.connect(clientAddr.first, server.port).then((socket) {
+ socket.destroy();
+ server.close();
+ asyncEnd();
kustermann 2016/12/13 19:36:45 If you add this then the test is disabled (same be
Florian Schneider 2016/12/13 20:23:16 Done.
+ }).catchError((e) {
server.close();
asyncEnd();
});
@@ -115,10 +119,16 @@ void testIPv4toIPv6_IPV6Only() {
server.listen((socket) {
throw "Unexpected socket";
});
- Socket.connect("127.0.0.1", server.port).catchError((error) {
- server.close();
- asyncEnd();
- });
+ Socket.connect("127.0.0.1", server.port)
+ .then((socket) {
+ socket.destroy();
+ server.close();
+ asyncEnd();
+ })
+ .catchError((error) {
+ server.close();
+ asyncEnd();
+ });
});
});
}
« 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