summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristina <kristina@10gen.com>2011-11-14 13:14:06 -0500
committerKristina <kristina@10gen.com>2011-11-14 13:14:06 -0500
commit0524f59fcf33abb7ac10bbe03657a1b5348f2443 (patch)
tree209a7fb5ca330a3b6c0769d1d5c86d9a70a45fce
parent94b35f403221390f5dac1750a5c4b6302eaadf2b (diff)
downloadmongo-0524f59fcf33abb7ac10bbe03657a1b5348f2443.tar.gz
Change replset tests to use non-static applyOperation
Conflicts: dbtests/repltests.cpp
-rw-r--r--dbtests/repltests.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/dbtests/repltests.cpp b/dbtests/repltests.cpp
index c6ffba28646..3dc125a4691 100644
--- a/dbtests/repltests.cpp
+++ b/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 ) {