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.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mongo/dbtests/repltests.cpp b/src/mongo/dbtests/repltests.cpp
index d768302d02d..cf6d2576323 100644
--- a/src/mongo/dbtests/repltests.cpp
+++ b/src/mongo/dbtests/repltests.cpp
@@ -203,7 +203,9 @@ namespace ReplTests {
if ( 0 ) {
mongo::unittest::log() << "op: " << *i << endl;
}
+ _txn.setReplicatedWrites(false);
a.applyOperation( &_txn, ctx.db(), *i );
+ _txn.setReplicatedWrites(true);
}
}
}
@@ -247,7 +249,9 @@ namespace ReplTests {
}
delete it;
for( vector< RecordId >::iterator i = toDelete.begin(); i != toDelete.end(); ++i ) {
+ _txn.setReplicatedWrites(false);
coll->deleteDocument( &_txn, *i, true );
+ _txn.setReplicatedWrites(true);
}
wunit.commit();
}
@@ -263,7 +267,9 @@ namespace ReplTests {
}
if ( o.hasField( "_id" ) ) {
+ _txn.setReplicatedWrites(false);
coll->insertDocument( &_txn, o, true );
+ _txn.setReplicatedWrites(true);
wunit.commit();
return;
}
@@ -273,7 +279,9 @@ namespace ReplTests {
id.init();
b.appendOID( "_id", &id );
b.appendElements( o );
+ _txn.setReplicatedWrites(false);
coll->insertDocument( &_txn, b.obj(), true );
+ _txn.setReplicatedWrites(true);
wunit.commit();
}
static BSONObj wid( const char *json ) {
@@ -290,9 +298,9 @@ namespace ReplTests {
class LogBasic : public Base {
public:
void run() {
- ASSERT_EQUALS( 1, opCount() );
- _client.insert( ns(), fromjson( "{\"a\":\"b\"}" ) );
ASSERT_EQUALS( 2, opCount() );
+ _client.insert( ns(), fromjson( "{\"a\":\"b\"}" ) );
+ ASSERT_EQUALS( 3, opCount() );
}
};