diff options
author | David Storch <david.storch@10gen.com> | 2014-05-06 19:00:56 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2014-05-06 19:00:56 -0400 |
commit | 72380726608df663a85bee24d69a20ed2ca8287d (patch) | |
tree | 735b7724ddc814fdf385d754bd7921975b5de491 /jstests/noPassthroughWithMongod/ttl_repl.js | |
parent | 3061ab54eb2cc642a279becfca0b93f5e17db117 (diff) | |
download | mongo-72380726608df663a85bee24d69a20ed2ca8287d.tar.gz |
Revert "SERVER-13741 Migrate remaining tests to use write commands"
This reverts commit 87dc3ae516e1d12a632dc604710661e38ed7b3dd.
Diffstat (limited to 'jstests/noPassthroughWithMongod/ttl_repl.js')
-rw-r--r-- | jstests/noPassthroughWithMongod/ttl_repl.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/jstests/noPassthroughWithMongod/ttl_repl.js b/jstests/noPassthroughWithMongod/ttl_repl.js index 5646ce22a39..3b251dfa8a9 100644 --- a/jstests/noPassthroughWithMongod/ttl_repl.js +++ b/jstests/noPassthroughWithMongod/ttl_repl.js @@ -29,11 +29,9 @@ masterdb.createCollection(mastercol.getName(), {usePowerOf2Sizes: false}); // create new collection. insert 24 docs, aged at one-hour intervalss now = (new Date()).getTime(); -var bulk = mastercol.initializeUnorderedBulkOp(); -for ( i=0; i<24; i++ ) { - bulk.insert({ x: new Date( now - ( 3600 * 1000 * i )) }); -} -assert.writeOK(bulk.execute()); +for ( i=0; i<24; i++ ) + mastercol.insert( { x : new Date( now - ( 3600 * 1000 * i ) ) } ); +masterdb.getLastError(); rt.awaitReplication(); assert.eq( 24 , mastercol.count() , "docs not inserted on primary" ); assert.eq( 24 , slave1col.count() , "docs not inserted on secondary" ); @@ -50,7 +48,8 @@ assert.eq( 0 , slave1col.stats().userFlags , "userFlags not 0 on secondary"); // create TTL index, wait for TTL monitor to kick in, then check that // userFlags get set to 1, and correct number of docs age out -assert.commandWorked(mastercol.ensureIndex({ x: 1 }, { expireAfterSeconds: 20000 })); +mastercol.ensureIndex( { x : 1 } , { expireAfterSeconds : 20000 } ); +masterdb.getLastError(); rt.awaitReplication(); sleep(70*1000); // TTL monitor runs every 60 seconds, so wait 70 |