Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change replset tests to use non-static applyOperation

Conflicts:

	dbtests/repltests.cpp
  • Loading branch information...
commit 0524f59fcf33abb7ac10bbe03657a1b5348f2443 1 parent 94b35f4
@kchodorow kchodorow authored
Showing with 7 additions and 8 deletions.
  1. +7 −8 dbtests/repltests.cpp
View
15 dbtests/repltests.cpp
@@ -105,12 +105,6 @@ namespace ReplTests {
return count;
}
static void applyAllOperations() {
- class Applier : public ReplSource {
- public:
- static void apply( const BSONObj &op ) {
- ReplSource::applyOperation( op );
- }
- };
dblock lk;
vector< BSONObj > ops;
{
@@ -120,8 +114,13 @@ namespace ReplTests {
}
{
Client::Context ctx( ns() );
- for( vector< BSONObj >::iterator i = ops.begin(); i != ops.end(); ++i )
- Applier::apply( *i );
+ BSONObjBuilder b;
+ b.append("host", "localhost");
+ b.appendTimestamp("syncedTo", 0);
+ ReplSource a(b.obj());
+ for( vector< BSONObj >::iterator i = ops.begin(); i != ops.end(); ++i ) {
+ a.applyOperation( *i );
+ }
}
}
static void printAll( const char *ns ) {
Please sign in to comment.
Something went wrong with that request. Please try again.