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

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

Issue 1072783003: Remove server socket references (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/io/server_socket_reference_issue21383_and_issue21384_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9d36c22c0621c778b65b9ce07e53ff6a811ad224..9c4e1ed284e29db1cf177d5679a1a772e96c1210 100644
--- a/tests/standalone/io/socket_bind_test.dart
+++ b/tests/standalone/io/socket_bind_test.dart
@@ -82,69 +82,6 @@ Future testBindDifferentAddresses(InternetAddress addr1,
});
}
-testSocketReferenceInteroperability(String host) {
- asyncStart();
- ServerSocket.bind(host, 0).then((ServerSocket socket) {
- Expect.isTrue(socket.port > 0);
-
- asyncStart();
- socket.reference.create().then((socket2) {
- bool gotResponseFrom1;
- bool gotResponseFrom2;
-
- Expect.isTrue(socket.port > 0);
- Expect.equals(socket.port, socket2.port);
-
- asyncStart();
- asyncStart();
- asyncStart();
- socket.listen((client) {
- client.drain().whenComplete(asyncEnd);
- client.write('1: hello world');
- client.close().whenComplete(asyncEnd);
- // NOTE: Closing the socket un-subscribes as well, which means the
- // other client connection must go to the other socket.
- socket.close().whenComplete(asyncEnd);
- }, onDone: asyncEnd);
-
- asyncStart();
- asyncStart();
- asyncStart();
- socket2.listen((client) {
- client.drain().whenComplete(asyncEnd);
- client.write('2: hello world');
- client.close().whenComplete(asyncEnd);
- // NOTE: Closing the socket un-subscribes as well, which means the
- // other client connection must go to the other socket.
- socket2.close().whenComplete(asyncEnd);
- }, onDone: asyncEnd);
-
- var futures = [];
- for (int i = 0; i < 2; i++) {
- asyncStart();
- futures.add(
- Socket.connect(socket.address, socket.port).then((Socket socket) {
- socket.close().whenComplete(asyncEnd);
- asyncStart();
- return socket
- .transform(ASCII.decoder).join('').then((String result) {
- if (result == '1: hello world') gotResponseFrom1 = true;
- else if (result == '2: hello world') gotResponseFrom2 = true;
- else throw 'Unexpected result from server: $result';
- asyncEnd();
- });
- }));
- }
- asyncStart();
- Future.wait(futures).then((_) {
- Expect.isTrue(gotResponseFrom1);
- Expect.isTrue(gotResponseFrom2);
- asyncEnd();
- });
- });
- });
-}
-
testListenCloseListenClose(String host) async {
asyncStart();
@@ -184,8 +121,6 @@ void main() {
negTestBindV6OnlyMismatch(host, true);
negTestBindV6OnlyMismatch(host, false);
- testSocketReferenceInteroperability(host);
-
testListenCloseListenClose(host);
}
« no previous file with comments | « tests/standalone/io/server_socket_reference_issue21383_and_issue21384_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698