Browse Source

Clean up test runner

Steven Silvester 8 years ago
parent
commit
4267ca86c0
4 changed files with 11 additions and 5 deletions
  1. 2 2
      scripts/travis_script.sh
  2. 2 1
      test/karma-cov.conf.js
  3. 2 1
      test/karma.conf.js
  4. 5 1
      test/run-test.py

+ 2 - 2
scripts/travis_script.sh

@@ -15,8 +15,8 @@ jupyter serverextension enable --py jupyterlab
 
 npm run clean
 npm run build
-npm test || npm test
-npm run test:coverage || npm run test:coverage
+npm test
+npm run test:coverage
 
 
 # Run the python tests

+ 2 - 1
test/karma-cov.conf.js

@@ -7,7 +7,8 @@ module.exports = function (config) {
     frameworks: ['mocha'],
     client: {
       mocha: {
-        timeout : 10000 // 10 seconds - upped from 2 seconds
+        timeout : 10000, // 10 seconds - upped from 2 seconds
+        retries: 3 // Allow for slow server on CI.
       }
     },
     reporters: ['mocha', 'coverage', 'remap-coverage'],

+ 2 - 1
test/karma.conf.js

@@ -5,7 +5,8 @@ module.exports = function (config) {
     reporters: ['mocha'],
     client: {
       mocha: {
-        timeout : 10000 // 10 seconds - upped from 2 seconds
+        timeout : 10000, // 10 seconds - upped from 2 seconds
+        retries: 3 // Allow for slow server on CI.
       }
     },
     files: [

+ 5 - 1
test/run-test.py

@@ -79,4 +79,8 @@ if __name__ == '__main__':
     # Reserve the command line arguments for karma.
     ARGS = sys.argv[1:]
     sys.argv = sys.argv[:1]
-    TestApp.launch_instance()
+
+    try:
+        TestApp.launch_instance()
+    except KeyboardInterrupt:
+        sys.exit(1)