summaryrefslogtreecommitdiff
path: root/jstests/noPassthroughWithMongod/index_check10.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/noPassthroughWithMongod/index_check10.js')
-rw-r--r--jstests/noPassthroughWithMongod/index_check10.js13
1 files changed, 4 insertions, 9 deletions
diff --git a/jstests/noPassthroughWithMongod/index_check10.js b/jstests/noPassthroughWithMongod/index_check10.js
index 84e7342e051..79d0d93fc9b 100644
--- a/jstests/noPassthroughWithMongod/index_check10.js
+++ b/jstests/noPassthroughWithMongod/index_check10.js
@@ -104,30 +104,25 @@ function doIt( indexVersion ) {
}
}
- var bulk = t.initializeUnorderedBulkOp();
for( var i = 0; i < 10000; ++i ) {
- bulk.insert( obj() );
+ t.save( obj() );
}
- assert.writeOK(bulk.execute());
t.ensureIndex( idx , { v : indexVersion } );
check();
- bulk = t.initializeUnorderedBulkOp();
for( var i = 0; i < 10000; ++i ) {
if ( Random.rand() > 0.9 ) {
- bulk.insert( obj() );
+ t.save( obj() );
} else {
- bulk.find( obj() ).remove(); // improve
+ t.remove( obj() ); // improve
}
if( Random.rand() > 0.999 ) {
print( i );
- assert.writeOK(bulk.execute());
check();
- bulk = t.initializeUnorderedBulkOp();
}
}
- assert.writeOK(bulk.execute());
+
check();
}