Skip to content

Commit af85f1d

Browse files
committed
[tests] Fix threading issue with parallel testing with non-threadsafe rspec mocks
1 parent ac76897 commit af85f1d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/spec/ruby/rack/application_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,8 +792,9 @@ def createRackServletWrapper(runtime, rackup, filename)
792792
expect(millis).to be >= 90 # waited about ~ 0.10 secs
793793
end
794794

795-
it "initializes initial runtimes in paralel (with wait set to false)" do
796-
allow(@factory).to receive(:init)
795+
it "initializes initial runtimes in parallel (with wait set to false)" do
796+
@factory = double("factory (non-tracking)", null_object: true)
797+
allow(@factory).to receive(:init).with(any_args)
797798
allow(@factory).to receive(:newApplication) do
798799
app = double "app"
799800
allow(app).to receive(:init) do

0 commit comments

Comments
 (0)