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: 😭

Change-Id: I72f3c39abb65a06524bbb981a8fdd8a7cbbac568
Reviewed-on: https://gerrit.instructure.com/81659
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
This commit is contained in:
Jon Jensen 2016-06-06 14:03:40 -06:00
parent 580e16f104
commit c0cc7bcba1
2 changed files with 3 additions and 12 deletions

View File

@ -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

View File

@ -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