diff options
author | Jason Chan <jason.chan@mongodb.com> | 2020-11-11 00:41:30 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-11-16 23:07:08 +0000 |
commit | 058228ec1106b71d5fe3a3a07e1c0a050a1a1485 (patch) | |
tree | 19f8cca54af4c8d11fedcda9e41c526c3256d1e2 /src/mongo/db/repl/database_cloner_test.cpp | |
parent | 55dc4222382b19547fc1d3657bd78e51297c2711 (diff) | |
download | mongo-058228ec1106b71d5fe3a3a07e1c0a050a1a1485.tar.gz |
SERVER-47863 Add fields to initial sync progress metrics
Diffstat (limited to 'src/mongo/db/repl/database_cloner_test.cpp')
-rw-r--r-- | src/mongo/db/repl/database_cloner_test.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/repl/database_cloner_test.cpp b/src/mongo/db/repl/database_cloner_test.cpp index 7dc72b24592..a3d27e8eafc 100644 --- a/src/mongo/db/repl/database_cloner_test.cpp +++ b/src/mongo/db/repl/database_cloner_test.cpp @@ -333,6 +333,9 @@ TEST_F(DatabaseClonerTest, FirstCollectionListIndexesFailed) { << "collection" << "options" << BSONObj() << "info" << BSON("readOnly" << false << "uuid" << uuid2))}; + // The collection cloner pre-stage makes a remote call to collStats to store in-progress + // metrics. + _mockServer->setCommandReply("collStats", BSON("size" << 0)); _mockServer->setCommandReply("listCollections", createListCollectionsResponse({sourceInfos[0], sourceInfos[1]})); _mockServer->setCommandReply("count", {createCountResponse(0), createCountResponse(0)}); @@ -369,6 +372,9 @@ TEST_F(DatabaseClonerTest, CreateCollections) { << BSON("readOnly" << false << "uuid" << uuid2))}; _mockServer->setCommandReply("listCollections", createListCollectionsResponse({sourceInfos[0], sourceInfos[1]})); + // The collection cloner pre-stage makes a remote call to collStats to store in-progress + // metrics. + _mockServer->setCommandReply("collStats", BSON("size" << 0)); _mockServer->setCommandReply("count", {createCountResponse(0), createCountResponse(0)}); _mockServer->setCommandReply("listIndexes", {createCursorResponse(_dbName + ".a", BSON_ARRAY(idIndexSpec)), @@ -412,6 +418,9 @@ TEST_F(DatabaseClonerTest, DatabaseAndCollectionStats) { << BSON("readOnly" << false << "uuid" << uuid2))}; _mockServer->setCommandReply("listCollections", createListCollectionsResponse({sourceInfos[0], sourceInfos[1]})); + // The collection cloner pre-stage makes a remote call to collStats to store in-progress + // metrics. + _mockServer->setCommandReply("collStats", BSON("size" << 0)); _mockServer->setCommandReply("count", {createCountResponse(0), createCountResponse(0)}); _mockServer->setCommandReply( "listIndexes", |