Permalink
Browse files

SERVER-2998 workarounds

  • Loading branch information...
1 parent c46900c commit ef0cae716fe0a1433ec7531ffa1a4f746d8336c4 @astaple astaple committed Apr 26, 2011
Showing with 7 additions and 0 deletions.
  1. +1 −0 jstests/delx.js
  2. +1 −0 jstests/drop3.js
  3. +4 −0 jstests/or5.js
  4. +1 −0 jstests/ord.js
View
@@ -23,6 +23,7 @@ x.next();
y.next();
a.foo.remove( { _id : { $gt : 50 } } );
+db.getLastError();
assert.eq( 51 , a.foo.find().itcount() , "B1" )
assert.eq( 100 , b.foo.find().itcount() , "B2" )
View
@@ -19,6 +19,7 @@ assert.eq( cursor.objsLeftInBatch(), 1 );
assert.eq( subcursor.objsLeftInBatch(), 1 );
t.drop(); // should invalidate cursor, but not subcursor
+db.getLastError();
assert.throws( function(){ cursor.itcount() } ); // throws "cursor doesn't exist on server" error on getMore
assert.eq( subcursor.itcount(), 9 ); //one already seen
View
@@ -70,6 +70,7 @@ assert.eq.automsg( "6", "t.find( {$or:[{a:2},{b:3},{c:4}]} ).batchSize( 2 ).itco
c = t.find( {$or:[{a:2},{b:3},{c:4}]} ).batchSize( 2 );
c.next();
t.remove( {b:3} );
+db.getLastError();
assert.eq.automsg( "3", c.itcount() );
reset();
@@ -78,6 +79,7 @@ c = t.find( {$or:[{a:2},{b:3},{c:4}]} ).batchSize( 2 );
c.next();
c.next();
t.remove( {b:3} );
+db.getLastError();
assert.eq.automsg( "2", c.itcount() );
reset();
@@ -87,6 +89,7 @@ c.next();
c.next();
c.next();
t.remove( {b:3} );
+db.getLastError();
assert.eq.automsg( "3", c.itcount() );
reset();
@@ -97,6 +100,7 @@ c.next();
c.next();
c.next();
t.remove( {b:3} );
+db.getLastError();
assert.eq.automsg( "2", c.itcount() );
t.drop();
View
@@ -28,6 +28,7 @@ for( i = 0; i < 90; ++i ) {
// the index key {a:1}
t.dropIndex( {a:1} );
+db.getLastError();
// Dropping an index kills all cursors on the indexed namespace, not just those
// cursors using the dropped index.

0 comments on commit ef0cae7

Please sign in to comment.