diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4caeb1bf6d..a5d957d00d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -79,7 +79,14 @@ jobs: ruby-version: ${{ env.DEFAULT_RUBY_VERSION }} bundler-cache: true - run: ./dev/ci/setup-host ${{ matrix.integration.label }} - - run: dscacheutil -q host -a name 1.passenger.test + - run: | + dscacheutil -q host -a name 127.0.0.1 + dscacheutil -q host -a name localhost + dscacheutil -q host -a name 1.passenger.test + dscacheutil -q host -a name 2.passenger.test + dscacheutil -q host -a name 3.passenger.test + dscacheutil -q host -a name 4.passenger.test + dscacheutil -q host -a name passenger.test if: matrix.os == 'macos-latest' - run: ./dev/ci/run-tests-with-docker ${{ matrix.integration.label }} if: matrix.os == 'ubuntu-latest' diff --git a/test/support/nginx_controller.rb b/test/support/nginx_controller.rb index af19ff7541..b2aab4c94d 100644 --- a/test/support/nginx_controller.rb +++ b/test/support/nginx_controller.rb @@ -44,7 +44,13 @@ 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. - sockaddr = Socket.pack_sockaddr_in(PORT, '127.0.0.1') + begin + sockaddr = Socket.pack_sockaddr_in(PORT, '127.0.0.1') + rescue SocketError -> e + p port + p e + raise e + end eventually(30) do !@controller.send(:ping_socket, Socket::Constants::AF_INET, sockaddr) end