Increase autospec qunit timeout to 600 seconds

Correct it so it refocuses on correct runner after running a test
JS tests can not focus on line so skip in vim mode
This commit is contained in:
Sam 2017-05-02 16:02:00 -04:00
parent 946f25098f
commit f5f4c36795
4 changed files with 24 additions and 7 deletions

View File

@ -66,10 +66,17 @@ class Autospec::Manager
Autospec::QunitRunner.new
end
def ensure_all_specs_will_run
def ensure_all_specs_will_run(current_runner=nil)
puts "@@@@@@@@@@@@ ensure_all_specs_will_run" if @debug
@queue.reject!{|_,s,_| s == "spec"}
if current_runner
@queue.concat [['spec', 'spec', current_runner]]
end
@runners.each do |runner|
@queue << ['spec', 'spec', runner] unless @queue.any? { |_, s, r| s == "spec" && r == runner }
@queue.concat [['spec', 'spec', runner]] unless @queue.any? { |_, s, r| s == "spec" && r == runner }
end
end
@ -126,7 +133,7 @@ class Autospec::Manager
has_failed = true
if result > 0
focus_on_failed_tests(current)
ensure_all_specs_will_run
ensure_all_specs_will_run(runner)
end
end
@ -186,7 +193,11 @@ class Autospec::Manager
# process_change can aquire a mutex and block
# the acceptor
Thread.new do
process_change([[file,line]])
if file =~ /(es6|js)$/
process_change([[file]])
else
process_change([[file,line]])
end
end
"OK"
end
@ -290,6 +301,9 @@ class Autospec::Manager
else
@queue.unshift([file, spec, runner])
end
# push run all specs to end of queue in correct order
ensure_all_specs_will_run(runner)
end
puts "@@@@@@@@@@@@ specs queued" if @debug
puts "@@@@@@@@@@@@ #{@queue}" if @debug

View File

@ -152,6 +152,9 @@ module Autospec
if m = /moduleForWidget\(['"]([^"']+)/i.match(line)
return "widget:#{m[1]}"
end
if m = /acceptance\(['"]([^"']+)/i.match(line)
return "Acceptance: #{m[1]}"
end
end
end

View File

@ -54,8 +54,8 @@ page.open(args[0], function (status) {
page.evaluate(colorizer);
page.evaluate(logQUnit);
// wait up to 60 seconds for QUnit to finish
var timeout = 60 * 1000,
// wait up to 600 seconds for QUnit to finish
var timeout = 600 * 1000,
start = Date.now();
var interval = setInterval(function() {

View File

@ -11,7 +11,7 @@ widgetTest('basics', {
template: '{{mount-widget widget="home-logo" args=args}}',
setup() {
this.siteSettings.logo_url = bigLogo;
this.siteSettings.logo_small_url= smallLogo;
this.siteSettings.logo_small_url = smallLogo;
this.siteSettings.title = title;
this.set('args', { minimized: false });
},