Skip to content

Commit

Permalink
Change replset tests to use non-static applyOperation
Browse files Browse the repository at this point in the history
Conflicts:

	dbtests/repltests.cpp
  • Loading branch information
kchodorow committed Nov 14, 2011
1 parent 94b35f4 commit 0524f59
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions dbtests/repltests.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -105,12 +105,6 @@ namespace ReplTests {
return count; return count;
} }
static void applyAllOperations() { static void applyAllOperations() {
class Applier : public ReplSource {
public:
static void apply( const BSONObj &op ) {
ReplSource::applyOperation( op );
}
};
dblock lk; dblock lk;
vector< BSONObj > ops; vector< BSONObj > ops;
{ {
Expand All @@ -120,8 +114,13 @@ namespace ReplTests {
} }
{ {
Client::Context ctx( ns() ); Client::Context ctx( ns() );
for( vector< BSONObj >::iterator i = ops.begin(); i != ops.end(); ++i ) BSONObjBuilder b;
Applier::apply( *i ); 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 ) { static void printAll( const char *ns ) {
Expand Down

0 comments on commit 0524f59

Please sign in to comment.