From dd708342dfd4474a98d0ace1a400fdab8fbdd052 Mon Sep 17 00:00:00 2001 From: Tim Robinson Date: Thu, 5 Mar 2015 15:45:19 +0000 Subject: [PATCH 1/2] Add stress parameter to keep refreshing until the test fails. Made npm run ctest work without auth --- plugins/c9.vfs.standalone/www/test.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/c9.vfs.standalone/www/test.html b/plugins/c9.vfs.standalone/www/test.html index 8c4d8a9f..dbffaac2 100644 --- a/plugins/c9.vfs.standalone/www/test.html +++ b/plugins/c9.vfs.standalone/www/test.html @@ -337,6 +337,10 @@ function done(err) { console.log("/" + Array(20).join("-")); console.log("finished running " + (i - 1) + " tests from " + all.length + ". In " + (Date.now() - t) + "ms"); + if (!err && document.URL.indexOf("stress=1") >= 0) { + console.log("Stress testing and found no errors so reloading"); + location.reload(); + } callback && callback(err); } } From 187c413fa76f76ad90ef8c9cf3f313bce289a221 Mon Sep 17 00:00:00 2001 From: Tim Robinson Date: Thu, 5 Mar 2015 15:45:19 +0000 Subject: [PATCH 2/2] made stress param actually work --- plugins/c9.vfs.standalone/www/test.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/c9.vfs.standalone/www/test.html b/plugins/c9.vfs.standalone/www/test.html index dbffaac2..49578f7c 100644 --- a/plugins/c9.vfs.standalone/www/test.html +++ b/plugins/c9.vfs.standalone/www/test.html @@ -337,7 +337,8 @@ function done(err) { console.log("/" + Array(20).join("-")); console.log("finished running " + (i - 1) + " tests from " + all.length + ". In " + (Date.now() - t) + "ms"); - if (!err && document.URL.indexOf("stress=1") >= 0) { + /* stress param makes the page continually refresh until a failure is found */ + if (document.URL.indexOf("stress=1") >= 0 && getReport() && !getReport().stats.failures) { console.log("Stress testing and found no errors so reloading"); location.reload(); }