Skip to content

Commit

Permalink
fix Win32 build -- improved cleanup for jstests
Browse files Browse the repository at this point in the history
So we don't run out of memory in 32-bit mode build.
  • Loading branch information
milkie committed Apr 13, 2012
1 parent 4bac4b0 commit 3bc6dc6
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 5 deletions.
6 changes: 4 additions & 2 deletions jstests/basicc.js
@@ -1,7 +1,7 @@
// test writing to two db's at the same time.

t1 = db.jstests_basicc;
var db = db.getSisterDB("test1");
var db = db.getSisterDB("test_basicc");
t2 = db.jstests_basicc;
t1.drop();
t2.drop();
Expand All @@ -14,6 +14,8 @@ for( var i = 0; i < 1000; ++i ) {
}
assert.automsg( "!db.getLastError()" );
stopMongoProgramByPid( pid );
// put things back the way we found it
t1.drop();
t2.drop();
db = db.getSisterDB("test"); // put things back the way we found it
db.dropDatabase();
db = db.getSisterDB("test");
4 changes: 2 additions & 2 deletions jstests/indexb.js
Expand Up @@ -5,9 +5,9 @@
// when it doesn't move


t = db.indexb;t = db.indexb;
t = db.indexb;
db.dropDatabase();
t.drop();

t.ensureIndex({a:1},true);

t.insert({a:1});
Expand Down
2 changes: 1 addition & 1 deletion jstests/mr1.js
Expand Up @@ -180,5 +180,5 @@ res = db.runCommand( { mapreduce : "mr1" , map : m , reduce : r , out : "mr1_out
assert( res.ok , "should be ok" );

t.drop();
t1 = db.mr1.out;
t1 = db.mr1_out;
t1.drop();
1 change: 1 addition & 0 deletions jstests/padding.js
Expand Up @@ -58,3 +58,4 @@ for (var i = 0; i < 1000; i++) {
// should have trended somewhat higher over the above.
// speed of increase would be higher with more indexes.
assert(p.stats().paddingFactor > ps + 0.03 , "now: " + p.stats().paddingFactor + " ps: " + ps );
p.drop();
1 change: 1 addition & 0 deletions jstests/sortb.js
Expand Up @@ -24,3 +24,4 @@ for( i = 200; i < 300; ++i ) {

assert.throws( function() { t.find().sort( {a:-1} ).hint( {b:1} ).limit( 100 ).itcount(); } );
assert.throws( function() { t.find().sort( {a:-1} ).hint( {b:1} ).showDiskLoc().limit( 100 ).itcount(); } );
t.drop();
1 change: 1 addition & 0 deletions jstests/sortf.js
Expand Up @@ -17,3 +17,4 @@ for( i = 0; i < 5; ++i ) {
}

assert.eq( 5, t.find( {a:1} ).sort( {b:1} ).itcount() );
t.drop();
1 change: 1 addition & 0 deletions jstests/sortg.js
Expand Up @@ -64,3 +64,4 @@ noMemoryException( {_id:1}, {b:null} );
// retried when the unindexed plan exhausts its memory limit.
assert.eq( 'BtreeCursor b_1', t.find( {b:0} ).sort( {_id:1} ).explain().cursor ); // Record b:1 plan
noMemoryException( {_id:1}, {b:null} );
t.drop();
1 change: 1 addition & 0 deletions jstests/sorth.js
Expand Up @@ -18,3 +18,4 @@ function checkIndex( index, n ) {

checkIndex( "BtreeCursor a_1", 100 );
checkIndex( "BtreeCursor b_1", 500 );
t.drop();

0 comments on commit 3bc6dc6

Please sign in to comment.