diff options
author | Esha Maharishi <esha.maharishi@mongodb.com> | 2017-04-19 17:56:42 -0400 |
---|---|---|
committer | Esha Maharishi <esha.maharishi@mongodb.com> | 2017-04-24 15:29:35 -0400 |
commit | fb19be647818a3625589d51cf471ab4c04e3362c (patch) | |
tree | f45407d8b2a8024af9be524e70dd131be25d2754 /src/mongo/s/query/store_possible_cursor_test.cpp | |
parent | 0cd3a79bd4c275f0cd8eadc9dd94c69d465b5e11 (diff) | |
download | mongo-fb19be647818a3625589d51cf471ab4c04e3362c.tar.gz |
SERVER-28870 make ClusterClientCursorParams::RemoteCursor store the ShardId
Diffstat (limited to 'src/mongo/s/query/store_possible_cursor_test.cpp')
-rw-r--r-- | src/mongo/s/query/store_possible_cursor_test.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/s/query/store_possible_cursor_test.cpp b/src/mongo/s/query/store_possible_cursor_test.cpp index d542e1ee760..4e70f1c4be1 100644 --- a/src/mongo/s/query/store_possible_cursor_test.cpp +++ b/src/mongo/s/query/store_possible_cursor_test.cpp @@ -42,6 +42,7 @@ namespace { const NamespaceString nss("test.collection"); const HostAndPort hostAndPort("testhost", 27017); +const ShardId shardId("testshard"); class StorePossibleCursorTest : public unittest::Test { protected: @@ -63,6 +64,7 @@ TEST_F(StorePossibleCursorTest, ReturnsValidCursorResponse) { CursorResponse cursorResponse(nss, CursorId(0), batch); auto outgoingCursorResponse = storePossibleCursor(nullptr, // OperationContext* + shardId, hostAndPort, cursorResponse.toBSON(CursorResponse::ResponseType::InitialResponse), nss, @@ -82,6 +84,7 @@ TEST_F(StorePossibleCursorTest, ReturnsValidCursorResponse) { // Test that storePossibleCursor() propagates an error if it cannot parse the cursor response. TEST_F(StorePossibleCursorTest, FailsGracefullyOnBadCursorResponseDocument) { auto outgoingCursorResponse = storePossibleCursor(nullptr, // OperationContext* + shardId, hostAndPort, fromjson("{ok: 1, cursor: {}}"), nss, @@ -97,6 +100,7 @@ TEST_F(StorePossibleCursorTest, PassesUpCommandResultIfItDoesNotDescribeACursor) BSONObj notACursorObj = BSON("not" << "cursor"); auto outgoingCursorResponse = storePossibleCursor(nullptr, // OperationContext* + shardId, hostAndPort, notACursorObj, nss, |