summaryrefslogtreecommitdiff
path: root/jstests/disk/preallocate_directoryperdb.js
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2014-05-06 19:00:56 -0400
committerDavid Storch <david.storch@10gen.com>2014-05-06 19:00:56 -0400
commit72380726608df663a85bee24d69a20ed2ca8287d (patch)
tree735b7724ddc814fdf385d754bd7921975b5de491 /jstests/disk/preallocate_directoryperdb.js
parent3061ab54eb2cc642a279becfca0b93f5e17db117 (diff)
downloadmongo-72380726608df663a85bee24d69a20ed2ca8287d.tar.gz
Revert "SERVER-13741 Migrate remaining tests to use write commands"
This reverts commit 87dc3ae516e1d12a632dc604710661e38ed7b3dd.
Diffstat (limited to 'jstests/disk/preallocate_directoryperdb.js')
-rw-r--r--jstests/disk/preallocate_directoryperdb.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/jstests/disk/preallocate_directoryperdb.js b/jstests/disk/preallocate_directoryperdb.js
index 38f55866f60..8b3d551b5d4 100644
--- a/jstests/disk/preallocate_directoryperdb.js
+++ b/jstests/disk/preallocate_directoryperdb.js
@@ -22,15 +22,14 @@ function checkDb2DirAbsent() {
var m = startMongod( "--smallfiles", "--directoryperdb", "--port", port, "--dbpath", dbpath, "--nohttpinterface", "--bind_ip", "127.0.0.1" );
db = m.getDB( baseName );
db2 = m.getDB( baseName2 );
-var bulk = db[ baseName ].initializeUnorderedBulkOp();
-var bulk2 = db2[ baseName2 ].initializeUnorderedBulkOp();
-var big = new Array( 5000 ).toString();
+c = db[ baseName ];
+c2 = db2[ baseName2 ];
+big = new Array( 5000 ).toString();
for( var i = 0; i < 3000; ++i ) {
- bulk.insert({ b:big });
- bulk2.insert({ b:big });
+ c.save( { b:big } );
+ c2.save( { b:big } );
+ db.getLastError();
}
-assert.writeOK(bulk.execute());
-assert.writeOK(bulk2.execute());
// Due to our write pattern, we expect db2's .3 file to be queued up in the file
// allocator behind db's .3 file at the time db2 is dropped. This will
@@ -44,7 +43,8 @@ db.dropDatabase();
// Try writing a new database, to ensure file allocator is still working.
db3 = m.getDB( baseName3 );
c3 = db[ baseName3 ];
-assert.writeOK(c3.insert( {} ));
+c3.save( {} );
+assert( !db3.getLastError() );
assert.eq( 1, c3.count() );
checkDb2DirAbsent();