summaryrefslogtreecommitdiff
path: root/jstests/noPassthroughWithMongod/index_check9.js
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2014-05-14 14:11:11 -0400
committerRandolph Tan <randolph@10gen.com>2014-05-15 14:04:11 -0400
commit0dabee8227d445a18fa5e8e49b2be60ba2a0beef (patch)
tree5cd9058a4483202c2f7e2ab6f5c44079a74ac157 /jstests/noPassthroughWithMongod/index_check9.js
parent4de88387eec6c0bb08b10d0ba1574a656f56232d (diff)
downloadmongo-0dabee8227d445a18fa5e8e49b2be60ba2a0beef.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
+}