You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ju...@apache.org on 2020/05/03 09:02:04 UTC

[couchdb] branch 3.x updated: Quit test run without checking that couchdb is running

This is an automated email from the ASF dual-hosted git repository.

juanjo pushed a commit to branch 3.x
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/3.x by this push:
     new ef160d6  Quit test run without checking that couchdb is running
ef160d6 is described below

commit ef160d6f32353522f1bfc031b40cd55f5b34d3bb
Author: Juanjo Rodriguez <ju...@apache.org>
AuthorDate: Sat May 2 23:12:02 2020 +0200

    Quit test run without checking that couchdb is running
---
 test/javascript/cli_runner.js | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/test/javascript/cli_runner.js b/test/javascript/cli_runner.js
index 7346762..a35348f 100644
--- a/test/javascript/cli_runner.js
+++ b/test/javascript/cli_runner.js
@@ -12,6 +12,19 @@
 //
 
 /*
+ * Quit current test execution if it is tagged as skipped or ported to elixir
+ */
+function quitIfSkippedOrPorted() {
+  if(couchTests.skip) {
+    quit(2);
+  }
+
+  if(couchTests.elixir) {
+    quit(3);
+  }
+}
+
+/*
  * Futon test suite was designed to be able to run all tests populated into
  * couchTests. Here we should only be loading one test, so we'll pop the first
  * test off the list and run the test. If more than one item is loaded in the
@@ -22,14 +35,6 @@ function runTest() {
   var count = 0;
   var start = new Date().getTime();
 
-  if(couchTests.skip) {
-      quit(2);
-  }
-
-  if(couchTests.elixir) {
-      quit(3);
-  }
-
   for(var name in couchTests) {
       count++;
   }
@@ -51,6 +56,8 @@ function runTest() {
   }
 }
 
+quitIfSkippedOrPorted();
+
 waitForSuccess(CouchDB.isRunning, 'isRunning');
 
 runTest();