diff options
author | Andrew Morrow <acm@mongodb.com> | 2016-05-25 10:00:51 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2016-05-25 11:40:54 -0400 |
commit | e70bf33d8eb199c6ab136fadd1b743e632011c09 (patch) | |
tree | 876ebb8fd7dbc0201a706dd37dd13379f523961f | |
parent | 6f72d36c1c8fc757962150713756ed2a553d817c (diff) | |
download | mongo-e70bf33d8eb199c6ab136fadd1b743e632011c09.tar.gz |
SERVER-23684 Busy wait for socket to become closed in stream test
-rw-r--r-- | src/mongo/executor/async_stream_test.cpp | 6 |
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 |