Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
33de3319
Commit
33de3319
authored
Apr 17, 2018
by
Tomasz Maczukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move Ci::BuildMetadata#update_timeout_state to after_transition callback
parent
fe9c9ad2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
5 deletions
+1
-5
app/models/ci/build.rb
app/models/ci/build.rb
+1
-1
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+0
-4
No files found.
app/models/ci/build.rb
View file @
33de3319
...
...
@@ -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
...
...
spec/models/ci/build_spec.rb
View file @
33de3319
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment