diff options
Diffstat (limited to 'spec/services/ci/archive_trace_service_spec.rb')
-rw-r--r-- | spec/services/ci/archive_trace_service_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/services/ci/archive_trace_service_spec.rb b/spec/services/ci/archive_trace_service_spec.rb index 47bc26c0521..ba94013b574 100644 --- a/spec/services/ci/archive_trace_service_spec.rb +++ b/spec/services/ci/archive_trace_service_spec.rb @@ -41,7 +41,9 @@ describe Ci::ArchiveTraceService, '#execute' do context 'when job failed to archive trace but did not raise an exception' do before do - allow_any_instance_of(Gitlab::Ci::Trace).to receive(:archive!) {} + allow_next_instance_of(Gitlab::Ci::Trace) do |instance| + allow(instance).to receive(:archive!) {} + end end it 'leaves a warning message in sidekiq log' do @@ -59,11 +61,11 @@ describe Ci::ArchiveTraceService, '#execute' do let(:job) { create(:ci_build, :running, :trace_live) } it 'increments Prometheus counter, sends crash report to Sentry and ignore an error for continuing to archive' do - expect(Gitlab::Sentry) - .to receive(:track_exception) + expect(Gitlab::ErrorTracking) + .to receive(:track_and_raise_for_dev_exception) .with(::Gitlab::Ci::Trace::ArchiveError, issue_url: 'https://gitlab.com/gitlab-org/gitlab-foss/issues/51502', - extra: { job_id: job.id } ).once + job_id: job.id).once expect(Sidekiq.logger).to receive(:warn).with( class: ArchiveTraceWorker.name, |