summaryrefslogtreecommitdiff
path: root/jstests/repl/repl12.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/repl/repl12.js')
-rw-r--r--jstests/repl/repl12.js46
1 files changed, 22 insertions, 24 deletions
diff --git a/jstests/repl/repl12.js b/jstests/repl/repl12.js
index 4d41462afde..9771a48178e 100644
--- a/jstests/repl/repl12.js
+++ b/jstests/repl/repl12.js
@@ -1,25 +1,25 @@
// SERVER-1626
// check for initial sync of multiple db's
-function debug( x ) {
- print( "DEBUG:" + tojson( x ) );
+function debug(x) {
+ print("DEBUG:" + tojson(x));
}
-rt = new ReplTest( "repl12tests" );
+rt = new ReplTest("repl12tests");
-m = rt.start( true );
+m = rt.start(true);
usedDBs = [];
a = "a";
-for( i = 0; i < 3; ++i ) {
- usedDBs.push( a );
- m.getDB( a ).c.save( {} );
+for (i = 0; i < 3; ++i) {
+ usedDBs.push(a);
+ m.getDB(a).c.save({});
a += "a";
}
-//print("\n\n\n DB NAMES MASTER:");
-//printjson(m.getDBNames());
+// print("\n\n\n DB NAMES MASTER:");
+// printjson(m.getDBNames());
var z = 10500;
print("sleeping " + z + "ms");
@@ -27,26 +27,24 @@ sleep(z);
s = rt.start(false);
-function countHave(){
+function countHave() {
var have = 0;
- for ( var i=0; i<usedDBs.length; i++ ){
- if ( s.getDB( usedDBs[i] ).c.findOne() )
+ for (var i = 0; i < usedDBs.length; i++) {
+ if (s.getDB(usedDBs[i]).c.findOne())
have++;
}
return have;
}
-assert.soon(
- function() {
- try {
- var c = countHave();
- debug( "count: " + c );
- return c == 3;
- } catch (e) {
- printjson(e);
- return false;
- }
+assert.soon(function() {
+ try {
+ var c = countHave();
+ debug("count: " + c);
+ return c == 3;
+ } catch (e) {
+ printjson(e);
+ return false;
}
-);
+});
-//printjson(s.getDBNames());
+// printjson(s.getDBNames());