summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/idempotency_test.cpp
diff options
context:
space:
mode:
authorLingzhi Deng <lingzhi.deng@mongodb.com>2019-11-21 15:15:03 +0000
committerevergreen <evergreen@mongodb.com>2019-11-21 15:15:03 +0000
commit5e1b0d1a69be18eb4f93f01831d9fd9db1b3a516 (patch)
tree61a3a773fb4edfa3f2be389f7dd1ab60875c4c2a /src/mongo/db/repl/idempotency_test.cpp
parentff955b4a97043dab1f562b3c6c77b10965f4a8c7 (diff)
downloadmongo-5e1b0d1a69be18eb4f93f01831d9fd9db1b3a516.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.cpp16
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 e76599bc86a..c7a12441d68 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;