diff options
author | Aaron <aaron@10gen.com> | 2009-04-23 13:55:07 -0400 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-04-23 13:55:07 -0400 |
commit | c303686482e6726392c3733ed35851a317d198e6 (patch) | |
tree | ecba34a6b7391d18a68f5b34309595ee7d8595e0 /jstests/repl | |
parent | 993aed6f2b9a2e5350821a44c3c928ec167014ea (diff) | |
download | mongo-c303686482e6726392c3733ed35851a317d198e6.tar.gz |
treat empty database same as just created database when figuring ownership
Diffstat (limited to 'jstests/repl')
-rw-r--r-- | jstests/repl/pair1.js | 4 | ||||
-rw-r--r-- | jstests/repl/pair2.js | 6 | ||||
-rw-r--r-- | jstests/repl/pair6.js | 6 | ||||
-rw-r--r-- | jstests/repl/repl1.js | 4 | ||||
-rw-r--r-- | jstests/repl/repl2.js | 4 | ||||
-rw-r--r-- | jstests/repl/repl3.js | 7 | ||||
-rw-r--r-- | jstests/repl/repl4.js | 4 | ||||
-rw-r--r-- | jstests/repl/repl5.js | 4 | ||||
-rw-r--r-- | jstests/repl/repl6.js | 4 | ||||
-rw-r--r-- | jstests/repl/replacePeer1.js | 4 | ||||
-rw-r--r-- | jstests/repl/replacePeer2.js | 4 |
11 files changed, 1 insertions, 50 deletions
diff --git a/jstests/repl/pair1.js b/jstests/repl/pair1.js index 26d1c6372d2..ff52798bdcf 100644 --- a/jstests/repl/pair1.js +++ b/jstests/repl/pair1.js @@ -28,10 +28,6 @@ checkWrite = function( m, s ) { check = function( s ) { s.setSlaveOk(); assert.soon( function() { - if ( -1 == s.getDBNames().indexOf( baseName ) ) - return false; - if ( -1 == s.getDB( baseName ).getCollectionNames().indexOf( "z" ) ) - return false; return 1 == getCount( s ); } ); } diff --git a/jstests/repl/pair2.js b/jstests/repl/pair2.js index 5da8d28928e..bccd972176f 100644 --- a/jstests/repl/pair2.js +++ b/jstests/repl/pair2.js @@ -11,11 +11,7 @@ ismaster = function( n ) { soonCount = function( count ) { assert.soon( function() { // print( "counting" ); - if ( -1 == l.getDBNames().indexOf( baseName ) ) - return false; - if ( -1 == l.getDB( baseName ).getCollectionNames().indexOf( "z" ) ) - return false; -// print( "counted: " + l.getDB( baseName ).z.find().count() ); +//// print( "counted: " + l.getDB( baseName ).z.find().count() ); return l.getDB( baseName ).z.find().count() == count; } ); } diff --git a/jstests/repl/pair6.js b/jstests/repl/pair6.js index 986a901d4e6..5930f0595b9 100644 --- a/jstests/repl/pair6.js +++ b/jstests/repl/pair6.js @@ -26,12 +26,6 @@ disconnect = function() { checkCount = function( m, c ) { m.setSlaveOk(); assert.soon( function() { - if ( -1 == m.getDBNames().indexOf( baseName ) ) { - return false; - } - if ( -1 == m.getDB( baseName ).getCollectionNames().indexOf( baseName ) ) { - return false; - } actual = m.getDB( baseName ).getCollection( baseName ).find().count(); print( actual ); return c == actual; }, diff --git a/jstests/repl/repl1.js b/jstests/repl/repl1.js index 00c70af89f0..4c0e14fa34a 100644 --- a/jstests/repl/repl1.js +++ b/jstests/repl/repl1.js @@ -5,10 +5,6 @@ var baseName = "jstests_repl1test"; soonCount = function( count ) { assert.soon( function() { // print( "check count" ); - if ( -1 == s.getDBNames().indexOf( baseName ) ) - return false; - if ( -1 == s.getDB( baseName ).getCollectionNames().indexOf( "a" ) ) - return false; // print( "count: " + s.getDB( baseName ).z.find().count() ); return s.getDB( baseName ).a.find().count() == count; } ); diff --git a/jstests/repl/repl2.js b/jstests/repl/repl2.js index 2bdb2021380..5d6ce26fa2f 100644 --- a/jstests/repl/repl2.js +++ b/jstests/repl/repl2.js @@ -5,10 +5,6 @@ var baseName = "jstests_repl2test"; soonCount = function( count ) { assert.soon( function() { // print( "check count" ); - if ( -1 == s.getDBNames().indexOf( baseName ) ) - return false; - if ( -1 == s.getDB( baseName ).getCollectionNames().indexOf( "a" ) ) - return false; // print( "count: " + s.getDB( baseName ).z.find().count() ); return s.getDB( baseName ).a.find().count() == count; } ); diff --git a/jstests/repl/repl3.js b/jstests/repl/repl3.js index 9bcdc741e77..4daf27aab6f 100644 --- a/jstests/repl/repl3.js +++ b/jstests/repl/repl3.js @@ -5,10 +5,6 @@ var baseName = "jstests_repl3test"; soonCount = function( count ) { assert.soon( function() { // print( "check count" ); - if ( -1 == s.getDBNames().indexOf( baseName ) ) - return false; - if ( -1 == s.getDB( baseName ).getCollectionNames().indexOf( "a" ) ) - return false; // print( "count: " + s.getDB( baseName ).z.find().count() ); return s.getDB( baseName ).a.find().count() == count; } ); @@ -38,9 +34,6 @@ doTest = function( signal ) { sleep( 15000 ); // Need the 2 additional seconds timeout, since commands don't work on an 'allDead' node. - assert.soon( function() { return s.getDBNames().indexOf( baseName ) != -1; } ); - assert.soon( function() { return s.getDB( baseName ).getCollectionNames().indexOf( "a" ) != -1; } ); - soonCount( 1001 ); as = s.getDB( baseName ).a assert.eq( 1, as.find( { i: 0 } ).count() ); diff --git a/jstests/repl/repl4.js b/jstests/repl/repl4.js index 12d45a98201..c7a4d8deced 100644 --- a/jstests/repl/repl4.js +++ b/jstests/repl/repl4.js @@ -4,10 +4,6 @@ var baseName = "jstests_repl4test"; soonCount = function( db, coll, count ) { assert.soon( function() { - if ( -1 == s.getDBNames().indexOf( db ) ) - return false; - if ( -1 == s.getDB( db ).getCollectionNames().indexOf( coll ) ) - return false; return s.getDB( db )[ coll ].find().count() == count; } ); } diff --git a/jstests/repl/repl5.js b/jstests/repl/repl5.js index 54982d2ab37..aff4f76d410 100644 --- a/jstests/repl/repl5.js +++ b/jstests/repl/repl5.js @@ -4,10 +4,6 @@ var baseName = "jstests_repl5test"; soonCountAtLeast = function( db, coll, count ) { assert.soon( function() { - if ( -1 == s.getDBNames().indexOf( db ) ) - return false; - if ( -1 == s.getDB( db ).getCollectionNames().indexOf( coll ) ) - return false; // print( "count: " + s.getDB( db )[ coll ].find().count() ); return s.getDB( db )[ coll ].find().count() >= count; } ); diff --git a/jstests/repl/repl6.js b/jstests/repl/repl6.js index e9daa6cefa9..5c9c0db6de5 100644 --- a/jstests/repl/repl6.js +++ b/jstests/repl/repl6.js @@ -5,10 +5,6 @@ var baseName = "jstests_repl6test"; soonCount = function( m, count ) { assert.soon( function() { // print( "check count" ); - if ( -1 == m.getDBNames().indexOf( baseName ) ) - return false; - if ( -1 == m.getDB( baseName ).getCollectionNames().indexOf( "a" ) ) - return false; // print( "count: " + s.getDB( baseName ).z.find().count() ); return m.getDB( baseName ).a.find().count() == count; } ); diff --git a/jstests/repl/replacePeer1.js b/jstests/repl/replacePeer1.js index fdae6cb4b0b..5b5857c30c5 100644 --- a/jstests/repl/replacePeer1.js +++ b/jstests/repl/replacePeer1.js @@ -24,10 +24,6 @@ checkWrite = function( m, s ) { assert.eq( 1, getCount( m ) ); s.setSlaveOk(); assert.soon( function() { - if ( -1 == s.getDBNames().indexOf( baseName ) ) - return false; - if ( -1 == s.getDB( baseName ).getCollectionNames().indexOf( "z" ) ) - return false; return 1 == getCount( s ); } ); } diff --git a/jstests/repl/replacePeer2.js b/jstests/repl/replacePeer2.js index 77272508d71..1a01b4075c2 100644 --- a/jstests/repl/replacePeer2.js +++ b/jstests/repl/replacePeer2.js @@ -24,10 +24,6 @@ checkWrite = function( m, s ) { assert.eq( 1, getCount( m ) ); s.setSlaveOk(); assert.soon( function() { - if ( -1 == s.getDBNames().indexOf( baseName ) ) - return false; - if ( -1 == s.getDB( baseName ).getCollectionNames().indexOf( "z" ) ) - return false; return 1 == getCount( s ); } ); } |