Commit d20c0682 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Just create failed builds rather than calling events

Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7617#note_18763033
parent da972617
......@@ -571,13 +571,10 @@ describe Ci::Pipeline, models: true do
context 'with failed pipeline' do
before do
perform_enqueued_jobs do
create(:ci_build, :created, pipeline: pipeline)
create(:generic_commit_status, :created, pipeline: pipeline)
create(:ci_build, :failed, pipeline: pipeline)
create(:generic_commit_status, :failed, pipeline: pipeline)
pipeline.statuses.count.times do |offset|
# workaround race conditions
pipeline.statuses.offset(offset).first.drop
end
pipeline.drop
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