summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/repltests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/dbtests/repltests.cpp')
-rw-r--r--src/mongo/dbtests/repltests.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mongo/dbtests/repltests.cpp b/src/mongo/dbtests/repltests.cpp
index 10c08845122..2dfa2f99fbc 100644
--- a/src/mongo/dbtests/repltests.cpp
+++ b/src/mongo/dbtests/repltests.cpp
@@ -172,7 +172,7 @@ namespace ReplTests {
if ( 0 ) {
mongo::unittest::log() << "op: " << *i << endl;
}
- a.applyOperation( *i );
+ a.applyOperation( ctx.db(), *i );
}
}
}
@@ -244,6 +244,9 @@ namespace ReplTests {
b.appendElements( fromjson( json ) );
return b.obj();
}
+ Database* db() {
+ return _context.db();
+ }
private:
static DBDirectClient client_;
};
@@ -1384,7 +1387,7 @@ namespace ReplTests {
bool returnEmpty;
SyncTest() : Sync(""), returnEmpty(false) {}
virtual ~SyncTest() {}
- virtual BSONObj getMissingDoc(const BSONObj& o) {
+ virtual BSONObj getMissingDoc(Database* db, const BSONObj& o) {
if (returnEmpty) {
BSONObj o;
return o;
@@ -1402,7 +1405,7 @@ namespace ReplTests {
// this should fail because we can't connect
try {
Sync badSource("localhost:123");
- badSource.getMissingDoc(o);
+ badSource.getMissingDoc(db(), o);
}
catch (DBException&) {
threw = true;