diff options
author | Randolph Tan <randolph@10gen.com> | 2014-05-14 14:11:11 -0400 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2014-05-15 14:04:11 -0400 |
commit | 0dabee8227d445a18fa5e8e49b2be60ba2a0beef (patch) | |
tree | 5cd9058a4483202c2f7e2ab6f5c44079a74ac157 /jstests/noPassthrough/update_server-5552.js | |
parent | 4de88387eec6c0bb08b10d0ba1574a656f56232d (diff) | |
download | mongo-0dabee8227d445a18fa5e8e49b2be60ba2a0beef.tar.gz |
SERVER-13741 Migrate remaining tests to use write commands
Diffstat (limited to 'jstests/noPassthrough/update_server-5552.js')
-rw-r--r-- | jstests/noPassthrough/update_server-5552.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/jstests/noPassthrough/update_server-5552.js b/jstests/noPassthrough/update_server-5552.js index d1f1bcb518b..c164ba67694 100644 --- a/jstests/noPassthrough/update_server-5552.js +++ b/jstests/noPassthrough/update_server-5552.js @@ -1,5 +1,3 @@ - - load( "jstests/libs/slow_weekly_util.js" ) testServer = new SlowWeeklyMongod( "update_server-5552" ) db = testServer.getDB( "test" ); @@ -9,9 +7,11 @@ t.drop() N = 10000; -for ( i=0; i<N; i++ ) - t.insert( { _id : i , x : 1 } ) -db.getLastError(); +var bulk = t.initializeUnorderedBulkOp(); +for ( i=0; i<N; i++ ) { + bulk.insert({ _id: i, x: 1 }); +} +assert.writeOK(bulk.execute()); join = startParallelShell( "while( db.foo.findOne( { _id : 0 } ).x == 1 ); db.foo.ensureIndex( { x : 1 } );" ) |