diff --git a/dev/ci/lib/set-container-envvars.sh b/dev/ci/lib/set-container-envvars.sh index face681048..046cb65a38 100644 --- a/dev/ci/lib/set-container-envvars.sh +++ b/dev/ci/lib/set-container-envvars.sh @@ -24,7 +24,7 @@ export CCACHE_LOGFILE="$(pwd)/buildout/testlogs/ccache.log" export NOEXEC_DISABLE=1 if [[ "$EXECUTOR_NUMBER" != "" ]]; then - (( TEST_PORT_BASE=64000+EXECUTOR_NUMBER*10 )) + (( TEST_PORT_BASE=64000 )) export TEST_PORT_BASE fi diff --git a/test/support/nginx_controller.rb b/test/support/nginx_controller.rb index c99332faf3..e016374ffa 100644 --- a/test/support/nginx_controller.rb +++ b/test/support/nginx_controller.rb @@ -7,6 +7,8 @@ class NginxController TEMPLATE_DIR = File.expand_path(File.dirname(__FILE__) + "/../stub/nginx") PORT = ENV.fetch('TEST_PORT_BASE', '64507').to_i + PORT = 64507 if PORT > 64507 + def initialize(root_dir, log_file) root_dir = File.expand_path(root_dir) @passenger_root = PhusionPassenger.install_spec @@ -44,13 +46,7 @@ def stop @controller.stop # On OS X, the Nginx server socket may linger around for a while # after Nginx shutdown, despite Nginx setting SO_REUSEADDR. - begin - sockaddr = Socket.pack_sockaddr_in(PORT, '127.0.0.1') - rescue SocketError => e - p port - p e - raise e - end + sockaddr = Socket.pack_sockaddr_in(PORT, '127.0.0.1') eventually(30) do !@controller.send(:ping_socket, Socket::Constants::AF_INET, sockaddr) end