diff options
author | matt dannenberg <matt.dannenberg@10gen.com> | 2015-03-13 06:35:51 -0400 |
---|---|---|
committer | matt dannenberg <matt.dannenberg@10gen.com> | 2015-04-09 10:57:16 -0400 |
commit | 1725d76f448323a2bbaa11ffd37fd7b10cd6a64b (patch) | |
tree | be35489fd99d5b0040f27d86b731cfcae1e4479a /src/mongo/dbtests/repltests.cpp | |
parent | acc7a72194990f35ff706bdcab7ec443c39fb0d5 (diff) | |
download | mongo-1725d76f448323a2bbaa11ffd37fd7b10cd6a64b.tar.gz |
SERVER-17573 move OpObserver calls into the datalayer as much as possible and eliminate repl bools
Diffstat (limited to 'src/mongo/dbtests/repltests.cpp')
-rw-r--r-- | src/mongo/dbtests/repltests.cpp | 12 |
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() ); } }; |