summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/repltests.cpp
diff options
context:
space:
mode:
authorA. Jesse Jiryu Davis <jesse@mongodb.com>2019-10-01 14:28:42 +0000
committerevergreen <evergreen@mongodb.com>2019-10-01 14:28:42 +0000
commitcd5a510974d939860046e29fd4cdcaf41c921f26 (patch)
treeed4a049a9e05ad2bd599bb195838870cb8288929 /src/mongo/dbtests/repltests.cpp
parent0a51d827a9a71ef5aebfea28422393628e11f74b (diff)
downloadmongo-cd5a510974d939860046e29fd4cdcaf41c921f26.tar.gz
SERVER-43691 Make repltests.cpp tests independent
Diffstat (limited to 'src/mongo/dbtests/repltests.cpp')
-rw-r--r--src/mongo/dbtests/repltests.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/dbtests/repltests.cpp b/src/mongo/dbtests/repltests.cpp
index 638e339766a..95e69a9e8cf 100644
--- a/src/mongo/dbtests/repltests.cpp
+++ b/src/mongo/dbtests/repltests.cpp
@@ -147,6 +147,9 @@ public:
wuow.commit();
_opCtx.getServiceContext()->getStorageEngine()->setOldestTimestamp(_lastSetOldestTimestamp);
+
+ // Start with a fresh oplog.
+ deleteAll(cllNS());
}
~Base() {
// Replication is not supported by mobile SE.
@@ -201,9 +204,6 @@ protected:
}
ASSERT_BSONOBJ_EQ(expected, got);
}
- BSONObj oneOp() const {
- return _client.findOne(cllNS(), BSONObj());
- }
int count() const {
Lock::GlobalWrite lk(&_opCtx);
OldClientContext ctx(&_opCtx, ns());
@@ -346,9 +346,9 @@ public:
if (mongo::storageGlobalParams.engine == "mobile") {
return;
}
- ASSERT_EQUALS(1, opCount());
+ ASSERT_EQUALS(0, opCount());
_client.insert(ns(), fromjson("{\"a\":\"b\"}"));
- ASSERT_EQUALS(2, opCount());
+ ASSERT_EQUALS(1, opCount());
}
};