From da449ac70ff05d1d39b9348c1e74e5bd34d1ff88 Mon Sep 17 00:00:00 2001 From: Nate Berkopec Date: Sat, 14 Mar 2020 07:32:00 -0600 Subject: [PATCH] Remove outdated port-setting in CLI test I think this may have been causing a problem in JRuby --- test/test_pumactl.rb | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/test/test_pumactl.rb b/test/test_pumactl.rb index 0e9ea1e4..d699bc17 100644 --- a/test/test_pumactl.rb +++ b/test/test_pumactl.rb @@ -22,13 +22,6 @@ class TestPumaControlCli < TestConfigFileBase @ready.close end - def find_open_port - server = TCPServer.new("127.0.0.1", 0) - server.addr[1] - ensure - server.close - end - def with_config_file(path_to_config, port) path = Pathname.new(path_to_config) Dir.mktmpdir do |tmp_dir| @@ -120,7 +113,7 @@ class TestPumaControlCli < TestConfigFileBase def test_control_url_and_status host = "127.0.0.1" - port = find_open_port + port = UniquePort.call url = "tcp://#{host}:#{port}/" opts = [ @@ -150,7 +143,7 @@ class TestPumaControlCli < TestConfigFileBase def test_control_ssl host = "127.0.0.1" - port = find_open_port + port = UniquePort.call url = "ssl://#{host}:#{port}?#{ssl_query}" opts = [