diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-02-05 19:52:46 +0300 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-02-06 09:50:08 +0300 |
commit | a2d79e1f2c8186fa69a91717b3d4e71a332d8bbf (patch) | |
tree | 4927baf9766d7edc4e8ab5d7a62af8686a965e34 /spec/workers/build_finished_worker_spec.rb | |
parent | d30e71b381b9cf33ed61b04c25c258c11942c79b (diff) |
Reorder async/sync tasks in BuildFinishedWorker to read traces efficiently
Diffstat (limited to 'spec/workers/build_finished_worker_spec.rb')
-rw-r--r-- | spec/workers/build_finished_worker_spec.rb | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/spec/workers/build_finished_worker_spec.rb b/spec/workers/build_finished_worker_spec.rb index 0f46ad5bbea..c7ff8cf3b92 100644 --- a/spec/workers/build_finished_worker_spec.rb +++ b/spec/workers/build_finished_worker_spec.rb @@ -6,19 +6,15 @@ describe BuildFinishedWorker do let!(:build) { create(:ci_build) } it 'calculates coverage and calls hooks' do - expect(BuildCoverageWorker) + expect(BuildTraceSectionsWorker) .to receive(:new).ordered.and_call_original - expect(BuildHooksWorker) + expect(BuildCoverageWorker) .to receive(:new).ordered.and_call_original - expect(BuildTraceSectionsWorker) - .to receive(:perform_async) - expect(CreateTraceArtifactWorker) - .to receive(:perform_async) - expect_any_instance_of(BuildCoverageWorker) - .to receive(:perform) - expect_any_instance_of(BuildHooksWorker) - .to receive(:perform) + expect_any_instance_of(BuildTraceSectionsWorker).to receive(:perform) + expect_any_instance_of(BuildCoverageWorker).to receive(:perform) + expect(BuildHooksWorker).to receive(:perform_async) + expect(CreateTraceArtifactWorker).to receive(:perform_async) described_class.new.perform(build.id) end |