Skip to content

Commit

Permalink
SERVER-2998 workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
astaple committed Apr 26, 2011
1 parent c46900c commit ef0cae7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions jstests/delx.js
Expand Up @@ -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" )
Expand Down
1 change: 1 addition & 0 deletions jstests/drop3.js
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions jstests/or5.js
Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -87,6 +89,7 @@ c.next();
c.next();
c.next();
t.remove( {b:3} );
db.getLastError();
assert.eq.automsg( "3", c.itcount() );

reset();
Expand All @@ -97,6 +100,7 @@ c.next();
c.next();
c.next();
t.remove( {b:3} );
db.getLastError();
assert.eq.automsg( "2", c.itcount() );

t.drop();
Expand Down
1 change: 1 addition & 0 deletions jstests/ord.js
Expand Up @@ -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.
Expand Down

0 comments on commit ef0cae7

Please sign in to comment.