Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix Win32 build -- improved cleanup for jstests

So we don't run out of memory in 32-bit mode build.
  • Loading branch information...
commit 3bc6dc6e4519f3a61808e2256c32498a1559a353 1 parent 4bac4b0
Eric Milkie milkie authored
6 jstests/basicc.js
View
@@ -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();
@@ -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 jstests/indexb.js
View
@@ -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});
2  jstests/mr1.js
View
@@ -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  jstests/padding.js
View
@@ -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  jstests/sortb.js
View
@@ -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  jstests/sortf.js
View
@@ -17,3 +17,4 @@ for( i = 0; i < 5; ++i ) {
}
assert.eq( 5, t.find( {a:1} ).sort( {b:1} ).itcount() );
+t.drop();
1  jstests/sortg.js
View
@@ -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  jstests/sorth.js
View
@@ -18,3 +18,4 @@ function checkIndex( index, n ) {
checkIndex( "BtreeCursor a_1", 100 );
checkIndex( "BtreeCursor b_1", 500 );
+t.drop();
Please sign in to comment.
Something went wrong with that request. Please try again.