From c0cc7bcba15340897892b03259888272f7331ff2 Mon Sep 17 00:00:00 2001 From: Jon Jensen Date: Mon, 6 Jun 2016 14:03:40 -0600 Subject: [PATCH] spec: bump karma browser timeout, add realtime output in js:test refs SD-1060 if a jenkins node is overloaded or has too few cores, tests can abort before starting. sometimes it takes more than 10 seconds for requirejs to load :allthethings: :sob: Change-Id: I72f3c39abb65a06524bbb981a8fdd8a7cbbac568 Reviewed-on: https://gerrit.instructure.com/81659 Reviewed-by: Clay Diffrient Tested-by: Jenkins Product-Review: Jon Jensen QA-Review: Jon Jensen --- karma.conf.js | 2 ++ lib/tasks/js.rake | 13 +------------ 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index bc6ae3bc826..479a4e69107 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -79,6 +79,8 @@ var karmaConfig = { // If browser does not capture in given timeout [ms], kill it captureTimeout: 60000, + browserNoActivityTimeout: 20000, + // Continuous Integration mode // if true, it capture browsers, run tests and exit singleRun: false diff --git a/lib/tasks/js.rake b/lib/tasks/js.rake index ff1a33eefd5..b1103c7e79c 100644 --- a/lib/tasks/js.rake +++ b/lib/tasks/js.rake @@ -129,8 +129,7 @@ namespace :js do end puts "--> executing browser tests with Karma" build_runner - karma_output = `./node_modules/karma/bin/karma start --browsers Chrome --single-run --reporters progress,#{reporter} 2>&1` - puts karma_output + system "./node_modules/karma/bin/karma start --browsers Chrome --single-run --reporters progress,#{reporter}" if $?.exitstatus != 0 puts 'some specs failed' @@ -367,14 +366,4 @@ namespace :js do EmberBundle.new(app).build end end - - #def npm_run(command) - #puts "Running npm script `#{command}`" - #msg = `$(npm bin)/#{command} 2>&1` - #unless $?.success? - #raise msg - #end - #msg - #end - end