summaryrefslogtreecommitdiff
path: root/jstests/slow2/replsets_killop.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/slow2/replsets_killop.js
parent4de88387eec6c0bb08b10d0ba1574a656f56232d (diff)
downloadmongo-0dabee8227d445a18fa5e8e49b2be60ba2a0beef.tar.gz
SERVER-13741 Migrate remaining tests to use write commands
Diffstat (limited to 'jstests/slow2/replsets_killop.js')
-rw-r--r--jstests/slow2/replsets_killop.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/jstests/slow2/replsets_killop.js b/jstests/slow2/replsets_killop.js
index 3d3ee51f709..e035ae3cd40 100644
--- a/jstests/slow2/replsets_killop.js
+++ b/jstests/slow2/replsets_killop.js
@@ -16,11 +16,11 @@ assert.soon( function() { return secondary.getDB( 'test' ).test.count() == 1; }
// Start a parallel shell to insert new documents on the primary.
inserter = startParallelShell(
- 'for( i = 1; i < ' + numDocs + '; ++i ) { \
- db.test.save( { a:i } ); \
- sleep( 1 ); \
- } \
- db.getLastError();'
+ 'var bulk = db.test.initializeUnorderedBulkOp(); \
+ for( i = 1; i < ' + numDocs + '; ++i ) { \
+ bulk.insert({ a: i }); \
+ } \
+ bulk.execute();'
);
// Periodically kill replication get mores.