diff options
-rw-r--r-- | jstests/parallel/basic.js | 8 | ||||
-rw-r--r-- | jstests/parallel/basicPlus.js | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/jstests/parallel/basic.js b/jstests/parallel/basic.js index bcb4d654ea0..757e2db7255 100644 --- a/jstests/parallel/basic.js +++ b/jstests/parallel/basic.js @@ -1,5 +1,13 @@ // perform basic js tests in parallel +// Drop all databases before running tests +var databases = db.adminCommand('listDatabases').databases; +for (var i = 0; i < databases.length; ++i) { + if (databases[i].name != "local") + db.getSiblingDB(databases[i].name).dropDatabase(); +} + + Random.setRandomSeed(); var params = ParallelTester.createJstestsLists( 4 ); diff --git a/jstests/parallel/basicPlus.js b/jstests/parallel/basicPlus.js index 4d65d255486..5d9df29fb34 100644 --- a/jstests/parallel/basicPlus.js +++ b/jstests/parallel/basicPlus.js @@ -1,5 +1,12 @@ // perform basic js tests in parallel & some other tasks as well +// Drop all databases before running tests +var databases = db.adminCommand('listDatabases').databases; +for (var i = 0; i < databases.length; ++i) { + if (databases[i].name != "local") + db.getSiblingDB(databases[i].name).dropDatabase(); +} + var c = db.jstests_parallel_basicPlus; c.drop(); |