diff options
author | Andrew Morrow <acm@10gen.com> | 2013-02-25 11:01:43 -0500 |
---|---|---|
committer | Andrew Morrow <acm@10gen.com> | 2013-02-26 11:49:04 -0500 |
commit | d3aef09798f59763f268a3e9ad35d0ddca1b7018 (patch) | |
tree | f79abde3c101dc1b960944c3520fbd94bb679723 | |
parent | 7e3abac147af2eecc3b199c905be47b5120b4ee9 (diff) | |
download | mongo-d3aef09798f59763f268a3e9ad35d0ddca1b7018.tar.gz |
SERVER-8719 Do not assume socket writes are coalesced in test
-rw-r--r-- | src/mongo/util/net/sock_test.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/util/net/sock_test.cpp b/src/mongo/util/net/sock_test.cpp index 97fe0102d11..c1e48c63d43 100644 --- a/src/mongo/util/net/sock_test.cpp +++ b/src/mongo/util/net/sock_test.cpp @@ -332,9 +332,11 @@ namespace { // Fail to recv that byte ASSERT_THROWS(tryRecv(), SocketException); } + // Failed byte should still be queued to recv. + ASSERT_EQUALS(size_t(1), countRecvable(1)); + // Channel should be working again ASSERT_TRUE(trySend()); - // Failed byte and additional byte should still be queued to recv. - ASSERT_EQUALS(size_t(2), countRecvable(2)); + ASSERT_TRUE(tryRecv()); } |