some fixes to ensure runner times out on js failure in runtine
This commit is contained in:
parent
8f13485f54
commit
9a905a862f
@ -60,7 +60,7 @@ module Flowerbox
|
|||||||
end
|
end
|
||||||
|
|
||||||
command :starting do
|
command :starting do
|
||||||
|
runner.did_start!
|
||||||
end
|
end
|
||||||
|
|
||||||
get %r{^/__F__/(.*)$} do |file|
|
get %r{^/__F__/(.*)$} do |file|
|
||||||
|
@ -7,11 +7,13 @@ module Flowerbox::Run
|
|||||||
|
|
||||||
time = 0
|
time = 0
|
||||||
realtime = Time.now.to_i
|
realtime = Time.now.to_i
|
||||||
|
failed = false
|
||||||
|
|
||||||
runner_envs = Flowerbox.runner_environment.collect do |env|
|
runner_envs = Flowerbox.runner_environment.collect do |env|
|
||||||
env.ensure_configured!
|
env.ensure_configured!
|
||||||
|
|
||||||
result_set << env.run(sprockets, spec_files, options)
|
result_set << env.run(sprockets, spec_files, options)
|
||||||
|
failed = true if !env.started?
|
||||||
|
|
||||||
time += env.time
|
time += env.time
|
||||||
|
|
||||||
@ -22,7 +24,7 @@ module Flowerbox::Run
|
|||||||
|
|
||||||
runner_envs.each(&:cleanup)
|
runner_envs.each(&:cleanup)
|
||||||
|
|
||||||
result_set.exitstatus
|
failed ? 1 : result_set.exitstatus
|
||||||
rescue Flowerbox::Runner::Base::RunnerDiedError
|
rescue Flowerbox::Runner::Base::RunnerDiedError
|
||||||
255
|
255
|
||||||
end
|
end
|
||||||
|
@ -11,6 +11,11 @@ module Flowerbox
|
|||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
@results = ResultSet.new
|
@results = ResultSet.new
|
||||||
|
@started = false
|
||||||
|
end
|
||||||
|
|
||||||
|
def started?
|
||||||
|
@started
|
||||||
end
|
end
|
||||||
|
|
||||||
def ensure_alive
|
def ensure_alive
|
||||||
@ -90,6 +95,10 @@ module Flowerbox
|
|||||||
@results.time = time
|
@results.time = time
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def did_start!
|
||||||
|
@started = true
|
||||||
|
end
|
||||||
|
|
||||||
def server
|
def server
|
||||||
return @server if @server
|
return @server if @server
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user