diff options
author | Lingzhi Deng <lingzhi.deng@mongodb.com> | 2019-10-04 00:55:10 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-10-04 00:55:10 +0000 |
commit | d1c6b36bf04dd90ad963ad5dfbfa491de0c88789 (patch) | |
tree | f6e48e5c9febe17fb708f13de3859b2493283274 /src/mongo/db/repl/idempotency_test.cpp | |
parent | aa2ccf6e1992b41ac1b286291e6217d91157f573 (diff) | |
download | mongo-d1c6b36bf04dd90ad963ad5dfbfa491de0c88789.tar.gz |
SERVER-42925 Refactor idempotency tests oplog application and fix oplog visiblity issues
Diffstat (limited to 'src/mongo/db/repl/idempotency_test.cpp')
-rw-r--r-- | src/mongo/db/repl/idempotency_test.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/db/repl/idempotency_test.cpp b/src/mongo/db/repl/idempotency_test.cpp index 96143015561..34fe562c2c8 100644 --- a/src/mongo/db/repl/idempotency_test.cpp +++ b/src/mongo/db/repl/idempotency_test.cpp @@ -60,7 +60,7 @@ protected: std::string getStatesString(const std::vector<CollectionState>& state1, const std::vector<CollectionState>& state2, - const MultiApplier::OperationPtrs& opPtrs) override; + const std::vector<OplogEntry>& ops) override; Status resetState() override; @@ -113,28 +113,28 @@ std::vector<OplogEntry> RandomizedIdempotencyTest::createUpdateSequence( std::string RandomizedIdempotencyTest::getStatesString(const std::vector<CollectionState>& state1, const std::vector<CollectionState>& state2, - const MultiApplier::OperationPtrs& opPtrs) { - unittest::log() << IdempotencyTest::getStatesString(state1, state2, opPtrs); + const std::vector<OplogEntry>& ops) { + unittest::log() << IdempotencyTest::getStatesString(state1, state2, ops); StringBuilder sb; sb << "Ran update ops: "; sb << "[ "; bool firstIter = true; - for (auto op : opPtrs) { + for (const auto& op : ops) { if (!firstIter) { sb << ", "; } else { firstIter = false; } - sb << op->toString(); + sb << op.toString(); } sb << " ]\n"; ASSERT_OK(resetState()); sb << "Start: " << getDoc() << "\n"; - for (auto op : opPtrs) { - ASSERT_OK(runOpInitialSync(*op)); - sb << "Apply: " << op->getObject() << "\n ==> " << getDoc() << "\n"; + for (const auto& op : ops) { + ASSERT_OK(runOpInitialSync(op)); + sb << "Apply: " << op.getObject() << "\n ==> " << getDoc() << "\n"; } sb << "Found from the seed: " << this->seed; |