diff options
author | Eliot Horowitz <eliot@10gen.com> | 2011-08-04 14:43:49 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2011-08-04 15:10:08 -0400 |
commit | 5716363c93f2483ad467fa8c4ad02c616b964a16 (patch) | |
tree | bce37c1970d8916925cb1029b5bb7f52816f1226 /jstests/dur | |
parent | dceaf5bb0b3bdd9362fe27081d3b01e9eec35267 (diff) | |
download | mongo-5716363c93f2483ad467fa8c4ad02c616b964a16.tar.gz |
line endings
Diffstat (limited to 'jstests/dur')
-rw-r--r-- | jstests/dur/diskfull.js | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/jstests/dur/diskfull.js b/jstests/dur/diskfull.js index da45c20afd4..4d3e4ccfd7b 100644 --- a/jstests/dur/diskfull.js +++ b/jstests/dur/diskfull.js @@ -14,23 +14,23 @@ for ( i in files ) { if ( !doIt ) { print( "path " + startPath + " missing, skipping diskfull test" ); doIt = false; -}
-
-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 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"); + } +} /** Clear dbpath without removing and recreating diskfulltest directory, as resetDbpath does */ function clear() { @@ -104,9 +104,9 @@ function runSecondMongdAndRecover() { // stopMongod seems to be asynchronous (hmmm) so we sleep here. sleep(5000); - // at this point, after clean shutdown, there should be no journal files
- log("check no journal files");
- checkNoJournalFiles(startPath + "/journal/");
+ // at this point, after clean shutdown, there should be no journal files + log("check no journal files"); + checkNoJournalFiles(startPath + "/journal/"); log(); } @@ -133,4 +133,4 @@ if ( doIt ) { print(testname + " SUCCESS"); -}
\ No newline at end of file +} |