diff --git a/lib/derailed_benchmarks/load_tasks.rb b/lib/derailed_benchmarks/load_tasks.rb index 89c578e..abbdd1e 100644 --- a/lib/derailed_benchmarks/load_tasks.rb +++ b/lib/derailed_benchmarks/load_tasks.rb @@ -121,7 +121,7 @@ DERAILED_APP = DerailedBenchmarks.add_auth(Object.class_eval { remove_const(:DERAILED_APP) }) if server = ENV["USE_SERVER"] - @port = (3000..3900).to_a.sample + @port = ENV.fetch("USE_PORT") { (3000..3900).to_a.sample } puts "Port: #{ @port.inspect }" puts "Server: #{ server.inspect }" thread = Thread.new do