summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2016-05-25 10:00:51 -0400
committerAndrew Morrow <acm@mongodb.com>2016-05-25 11:40:54 -0400
commite70bf33d8eb199c6ab136fadd1b743e632011c09 (patch)
tree876ebb8fd7dbc0201a706dd37dd13379f523961f
parent6f72d36c1c8fc757962150713756ed2a553d817c (diff)
downloadmongo-e70bf33d8eb199c6ab136fadd1b743e632011c09.tar.gz
SERVER-23684 Busy wait for socket to become closed in stream test
-rw-r--r--src/mongo/executor/async_stream_test.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/executor/async_stream_test.cpp b/src/mongo/executor/async_stream_test.cpp
index 508e81aa5f5..b772b5ac0e1 100644
--- a/src/mongo/executor/async_stream_test.cpp
+++ b/src/mongo/executor/async_stream_test.cpp
@@ -134,7 +134,11 @@ TEST(AsyncStreamTest, IsOpen) {
server.shutdown();
- ASSERT_FALSE(stream.isOpen());
+ // There is nothing we can wait on to determinstically know when
+ // the socket will transition to closed. Busy wait for that.
+ while (stream.isOpen()) {
+ stdx::this_thread::sleep_for(Milliseconds(1).toSystemDuration());
+ }
}
} // namespace