Skip to content

Commit c7c9864

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

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/spec/ruby/rack/application_spec.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,11 @@ 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
795+
it "initializes initial runtimes in parallel (with wait set to false)" do
796+
@factory = double("factory (non-tracking)", null_object: true)
797+
@pooling_factory = org.jruby.rack.PoolingRackApplicationFactory.new @factory
798+
@pooling_factory.context = @rack_context
799+
796800
allow(@factory).to receive(:init)
797801
allow(@factory).to receive(:newApplication) do
798802
app = double "app"

0 commit comments

Comments
 (0)