Commit 33de3319 authored by Tomasz Maczukin's avatar Tomasz Maczukin

Move Ci::BuildMetadata#update_timeout_state to after_transition callback

parent fe9c9ad2
......@@ -162,7 +162,7 @@ module Ci
build.validates_dependencies! unless Feature.enabled?('ci_disable_validates_dependencies')
end
before_transition pending: :running do |build|
after_transition pending: :running do |build|
build.ensure_metadata.update_timeout_state
end
end
......
......@@ -2140,10 +2140,6 @@ describe Ci::Build do
it "doesn't save timeout_source" do
expect { run_job_without_exception }.not_to change { job.reload.ensure_metadata.timeout_source }
end
it 'raises an exception' do
expect { job.run! }.to raise_error(StateMachines::InvalidTransition)
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment