summaryrefslogtreecommitdiff
path: root/jstests/noPassthroughWithMongod/index_check9.js
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2014-04-25 14:04:36 -0400
committerRandolph Tan <randolph@10gen.com>2014-05-06 16:32:44 -0400
commit87dc3ae516e1d12a632dc604710661e38ed7b3dd (patch)
tree3a483a3d0c38ce00a7f4d7dba0e9cba7f7eba5f3 /jstests/noPassthroughWithMongod/index_check9.js
parent6b945ec15c61f6bd4bfbaf382624d886ec8441d2 (diff)
downloadmongo-87dc3ae516e1d12a632dc604710661e38ed7b3dd.tar.gz
SERVER-13741 Migrate remaining tests to use write commands
Diffstat (limited to 'jstests/noPassthroughWithMongod/index_check9.js')
-rw-r--r--jstests/noPassthroughWithMongod/index_check9.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/jstests/noPassthroughWithMongod/index_check9.js b/jstests/noPassthroughWithMongod/index_check9.js
index 8a50471940b..fd1b1d5eaa1 100644
--- a/jstests/noPassthroughWithMongod/index_check9.js
+++ b/jstests/noPassthroughWithMongod/index_check9.js
@@ -106,25 +106,32 @@ function check() {
assert.eq( c3.length, count );
}
+var bulk = t.initializeUnorderedBulkOp();
for( var i = 0; i < 10000; ++i ) {
- t.save( obj() );
+ bulk.insert( obj() );
if( Random.rand() > 0.999 ) {
print( i );
+ assert.writeOK(bulk.execute());
check();
+ bulk = t.initializeUnorderedBulkOp();
}
}
+bulk = t.initializeUnorderedBulkOp();
for( var i = 0; i < 100000; ++i ) {
if ( Random.rand() > 0.9 ) {
- t.save( obj() );
+ bulk.insert( obj() );
} else {
- t.remove( obj() ); // improve
+ bulk.find( obj() ).remove(); // improve
}
if( Random.rand() > 0.999 ) {
print( i );
+ assert.writeOK(bulk.execute());
check();
+ bulk = t.initializeUnorderedBulkOp();
}
}
+assert.writeOK(bulk.execute());
check();
@@ -132,4 +139,4 @@ check();
for( var z = 0; z < 5; ++z ) {
doIt();
-} \ No newline at end of file
+}