summaryrefslogtreecommitdiff
path: root/src/mongo/rpc/protocol_test.cpp
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2015-08-21 11:17:18 -0400
committerDavid Storch <david.storch@10gen.com>2015-08-24 09:31:13 -0400
commitdd15f9c211f5bc40b6fa8a7cd44350d3aeb87d89 (patch)
treec5dd533a814bf498f3aec4a7b52b1c707af5eb11 /src/mongo/rpc/protocol_test.cpp
parent9140a197d93251d262e4f241e9d3b371ea8f5c2b (diff)
downloadmongo-dd15f9c211f5bc40b6fa8a7cd44350d3aeb87d89.tar.gz
SERVER-18849 only send wire version for find/getMore commands if config server mode is CSRS
A mongod will return a maxWireVersion of 4 to indicate support for the find and getMore commands. In constrast, mongos will only return maxWireVersion of 4 if configured with CSRS, as full find/getMore command support is predicated on config server as a replica set.
Diffstat (limited to 'src/mongo/rpc/protocol_test.cpp')
-rw-r--r--src/mongo/rpc/protocol_test.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/rpc/protocol_test.cpp b/src/mongo/rpc/protocol_test.cpp
index 0f26cc586b2..ad8437ee280 100644
--- a/src/mongo/rpc/protocol_test.cpp
+++ b/src/mongo/rpc/protocol_test.cpp
@@ -71,18 +71,18 @@ TEST(Protocol, FailedNegotiation) {
TEST(Protocol, parseProtocolSetFromIsMasterReply) {
{
// MongoDB 3.2 (mongod)
- auto mongod32 = BSON("maxWireVersion"
- << static_cast<int>(WireVersion::RELEASE_3_1_5) << "minWireVersion"
- << static_cast<int>(WireVersion::RELEASE_2_4_AND_BEFORE));
+ auto mongod32 =
+ BSON("maxWireVersion" << static_cast<int>(WireVersion::FIND_COMMAND) << "minWireVersion"
+ << static_cast<int>(WireVersion::RELEASE_2_4_AND_BEFORE));
ASSERT_EQ(assertGet(parseProtocolSetFromIsMasterReply(mongod32)), supports::kAll);
}
{
// MongoDB 3.2 (mongos)
- auto mongos32 = BSON("maxWireVersion"
- << static_cast<int>(WireVersion::RELEASE_3_1_5) << "minWireVersion"
- << static_cast<int>(WireVersion::RELEASE_2_4_AND_BEFORE) << "msg"
- << "isdbgrid");
+ auto mongos32 =
+ BSON("maxWireVersion" << static_cast<int>(WireVersion::FIND_COMMAND) << "minWireVersion"
+ << static_cast<int>(WireVersion::RELEASE_2_4_AND_BEFORE) << "msg"
+ << "isdbgrid");
ASSERT_EQ(assertGet(parseProtocolSetFromIsMasterReply(mongos32)), supports::kOpQueryOnly);
}