Skip to content

Commit fdc1c3d

Browse files
authored
Attempt to fix flaky threaded worker logging test (#4419)
This test occasionally fails in CI with: `can't convert RSpec::Mocks::Double to Hash (RSpec::Mocks::Double#to_hash gives RSpec::Mocks::Double)` It is difficult to reproduce, but I think that using a true Hash instead of a spy may make it more reliable Example failure: https://github.com/cloudfoundry/cloud_controller_ng/actions/runs/15833920407/job/44685199774?pr=4416
1 parent 9b94f5f commit fdc1c3d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec/unit/lib/delayed_job/threaded_worker_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@
6464
end
6565

6666
it 'sets the worker name in the Steno context' do
67-
steno_data_spy = spy('data')
67+
steno_data_spy = {}
68+
allow(steno_data_spy).to receive(:[]=).and_call_original
6869
allow(Steno.config.context).to receive(:data).and_return(steno_data_spy)
6970

7071
worker.start

0 commit comments

Comments
 (0)