summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/op_observer_sharding_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/op_observer_sharding_test.cpp')
-rw-r--r--src/mongo/db/s/op_observer_sharding_test.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/s/op_observer_sharding_test.cpp b/src/mongo/db/s/op_observer_sharding_test.cpp
index 498051105ad..1ef41426f26 100644
--- a/src/mongo/db/s/op_observer_sharding_test.cpp
+++ b/src/mongo/db/s/op_observer_sharding_test.cpp
@@ -97,6 +97,7 @@ TEST_F(DocumentKeyStateTest, MakeDocumentKeyStateUnsharded) {
ASSERT_BSONOBJ_EQ(repl::getDocumentKey(operationContext(), kTestNss, doc).getShardKeyAndId(),
BSON("_id"
<< "hello"));
+ ASSERT_FALSE(OpObserverShardingImpl::isMigrating(operationContext(), kTestNss, doc));
}
TEST_F(DocumentKeyStateTest, MakeDocumentKeyStateShardedWithoutIdInShardKey) {
@@ -123,6 +124,7 @@ TEST_F(DocumentKeyStateTest, MakeDocumentKeyStateShardedWithoutIdInShardKey) {
<< "abc"
<< "_id"
<< "hello"));
+ ASSERT_FALSE(OpObserverShardingImpl::isMigrating(operationContext(), kTestNss, doc));
}
TEST_F(DocumentKeyStateTest, MakeDocumentKeyStateShardedWithIdInShardKey) {
@@ -148,6 +150,7 @@ TEST_F(DocumentKeyStateTest, MakeDocumentKeyStateShardedWithIdInShardKey) {
BSON("key" << 100 << "_id"
<< "hello"
<< "key2" << true));
+ ASSERT_FALSE(OpObserverShardingImpl::isMigrating(operationContext(), kTestNss, doc));
}
TEST_F(DocumentKeyStateTest, MakeDocumentKeyStateShardedWithIdHashInShardKey) {
@@ -170,6 +173,7 @@ TEST_F(DocumentKeyStateTest, MakeDocumentKeyStateShardedWithIdHashInShardKey) {
ASSERT_BSONOBJ_EQ(repl::getDocumentKey(operationContext(), kTestNss, doc).getShardKeyAndId(),
BSON("_id"
<< "hello"));
+ ASSERT_FALSE(OpObserverShardingImpl::isMigrating(operationContext(), kTestNss, doc));
}