summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2011-04-26 00:15:14 -0700
committerAaron <aaron@10gen.com>2011-04-26 00:15:14 -0700
commitef0cae716fe0a1433ec7531ffa1a4f746d8336c4 (patch)
treeab92156a188a88a2d013b938a498520aae35a19c
parentc46900cf81ec39d5ae8f52e5a7daa322118647f9 (diff)
downloadmongo-ef0cae716fe0a1433ec7531ffa1a4f746d8336c4.tar.gz
SERVER-2998 workarounds
-rw-r--r--jstests/delx.js1
-rw-r--r--jstests/drop3.js1
-rw-r--r--jstests/or5.js4
-rw-r--r--jstests/ord.js1
4 files changed, 7 insertions, 0 deletions
diff --git a/jstests/delx.js b/jstests/delx.js
index 3f8c88c1648..aa858e92cbd 100644
--- a/jstests/delx.js
+++ b/jstests/delx.js
@@ -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" )
diff --git a/jstests/drop3.js b/jstests/drop3.js
index 1badf07d54b..b2ca94a1550 100644
--- a/jstests/drop3.js
+++ b/jstests/drop3.js
@@ -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
diff --git a/jstests/or5.js b/jstests/or5.js
index baa6bd6f847..98ff141f575 100644
--- a/jstests/or5.js
+++ b/jstests/or5.js
@@ -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();
diff --git a/jstests/ord.js b/jstests/ord.js
index 4612f218f64..f78e5044074 100644
--- a/jstests/ord.js
+++ b/jstests/ord.js
@@ -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.