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

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

Issue 2837163002: Fixed racey testShutdown test, where echoServer was throwing an exception after trying to write to … (Closed)
Patch Set: Created 3 years, 8 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 | « 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/raw_synchronous_socket_test.dart
diff --git a/tests/standalone/io/raw_synchronous_socket_test.dart b/tests/standalone/io/raw_synchronous_socket_test.dart
index 3f3e95f53b97c3d80dc8c442fdd7f3e6314884e3..2b005c7a7070d1fcbfe58c32a0e0ac0424833b75 100644
--- a/tests/standalone/io/raw_synchronous_socket_test.dart
+++ b/tests/standalone/io/raw_synchronous_socket_test.dart
@@ -388,12 +388,11 @@ Future testShutdown() async {
() => socket.readSync(data.length), (e) => e is SocketException);
socket.closeSync();
- // Close the socket for reading, do a write, and see if we can get any
- // response from the server (we shouldn't be able to).
+ // Close the socket for reading then try and perform a read. This should
+ // cause a SocketException.
socket = RawSynchronousSocket.connectSync(
LOOPBACK_IP_V4_STRING, serverInternetPort);
socket.shutdown(SocketDirection.RECEIVE);
siva 2017/04/27 18:28:56 Instead of deleting the write which is a good test
- socket.writeFromSync(data);
// Throws exception when the socket is closed for RECEIVE.
Expect.throws(
() => socket.readSync(data.length), (e) => e is SocketException);
« 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