summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/socket/transport_client_socket_unittest.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/socket/transport_client_socket_unittest.cc b/net/socket/transport_client_socket_unittest.cc
index 59308c5..aded7d1 100644
--- a/net/socket/transport_client_socket_unittest.cc
+++ b/net/socket/transport_client_socket_unittest.cc
@@ -257,8 +257,12 @@ TEST_P(TransportClientSocketTest, IsConnected) {
&callback);
ASSERT_EQ(bytes_read, arraysize(kServerReply) - 2);
- // Once the data is drained, the socket should now be seen as
- // closed.
+ // Once the data is drained, wait for the server socket to be closed.
+ rv = sock_->Read(buf, 4096, callback.callback());
+ rv = callback.GetResult(rv);
+ EXPECT_EQ(0, rv);
+
+ // The socket should now be seen as not connected.
EXPECT_FALSE(sock_->IsConnected());
EXPECT_FALSE(sock_->IsConnectedAndIdle());
}