summaryrefslogtreecommitdiff
path: root/jstests/dur/dropdb.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/dur/dropdb.js')
-rw-r--r--jstests/dur/dropdb.js22
1 files changed, 19 insertions, 3 deletions
diff --git a/jstests/dur/dropdb.js b/jstests/dur/dropdb.js
index 0df0f113894..8e1aeffb2b6 100644
--- a/jstests/dur/dropdb.js
+++ b/jstests/dur/dropdb.js
@@ -4,7 +4,23 @@
var debugging = false;
var testname = "dropdb";
var step = 1;
-var conn = null;
+var conn = null;
+
+function checkNoJournalFiles(path, pass) {
+ var files = listFiles(path);
+ if (files.some(function (f) { return f.name.indexOf("prealloc") < 0; })) {
+ if (pass == null) {
+ // wait a bit longer for mongod to potentially finish if it is still running.
+ sleep(10000);
+ return checkNoJournalFiles(path, 1);
+ }
+ print("\n\n\n");
+ print("FAIL path:" + path);
+ print("unexpected files:");
+ printjson(files);
+ assert(false, "FAIL a journal/lsn file is present which is unexpected");
+ }
+}
function runDiff(a, b) {
function reSlash(s) {
@@ -115,8 +131,8 @@ stopMongod(30002);
sleep(5000);
// at this point, after clean shutdown, there should be no journal files
-log("check no journal files");
-assert.eq( [], listFiles(path2 + "/journal") );
+log("check no journal files");
+checkNoJournalFiles(path2 + "/journal");
log("check data matches ns");
var diff = runDiff(path1 + "/test.ns", path2 + "/test.ns");