Because we were only checking for database readiness from inside the container, there was a case where we would consider the TmpDb "ready" and allow connections before the Docker daemon had actually exposed the database port to the host. This change explicitly checks that the port is exposed on the host before returning, with no extra dependencies on the host side.
This fixes an intermittent "Connection Refused" error that @rob-maron and I were seeing while debugging an unrelated sequencer test failure.
Because we were only checking for database readiness from inside the container, there was a case where we would consider the TmpDb "ready" and allow connections before the Docker daemon had actually exposed the database port to the host. This change explicitly checks that the port is exposed on the host before returning, with no extra dependencies on the host side.
This fixes an intermittent "Connection Refused" error that @rob-maron and I were seeing while debugging an unrelated sequencer test failure.