DEV: Increase timeout for JS tests and add env variable

This commit is contained in:
Gerhard Schlager 2019-03-18 17:39:25 +01:00
parent 976ea160e9
commit 81108ee783
1 changed files with 7 additions and 4 deletions

View File

@ -13,6 +13,7 @@
# => BISECT set to 1 to run rspec --bisect (applies to core rspec tests only)
# => RSPEC_SEED set to seed to use for rspec tests (applies to core rspec tests only)
# => PAUSE_ON_TERMINATE set to 1 to pause prior to terminating redis and pg
# => JS_TIMEOUT set timeout for qunit tests in ms
#
# Other useful environment variables (not specific to this rake task)
# => COMMIT_HASH used by the discourse_test docker image to load a specific commit of discourse
@ -152,17 +153,19 @@ task 'docker:test' do
end
unless ENV["RUBY_ONLY"]
js_timeout = ENV["JS_TIMEOUT"].presence || 900_000 # 15 minutes
puts "travis_fold:start:js_tests" if ENV["TRAVIS"]
unless ENV["SKIP_CORE"]
@good &&= run_or_fail("bundle exec rake qunit:test['600000']")
@good &&= run_or_fail("bundle exec rake qunit:test['600000','/wizard/qunit']")
@good &&= run_or_fail("bundle exec rake qunit:test['#{js_timeout}']")
@good &&= run_or_fail("bundle exec rake qunit:test['#{js_timeout}','/wizard/qunit']")
end
unless ENV["SKIP_PLUGINS"]
if ENV["SINGLE_PLUGIN"]
@good &&= run_or_fail("bundle exec rake plugin:qunit['#{ENV['SINGLE_PLUGIN']}','600000']")
@good &&= run_or_fail("bundle exec rake plugin:qunit['#{ENV['SINGLE_PLUGIN']}','#{js_timeout}']")
else
@good &&= run_or_fail("bundle exec rake plugin:qunit['*','600000']")
@good &&= run_or_fail("bundle exec rake plugin:qunit['*','#{js_timeout}']")
end
end
puts "travis_fold:end:js_tests" if ENV["TRAVIS"]