-
-
Notifications
You must be signed in to change notification settings - Fork 251
Description
Expected Behaviour
Tests should be able to connect to the database container normally after startup.
...
Actual Behaviour
After terminating a test run using Ctrl+C, all subsequent tests fail because the database container becomes unreachable. Although the container is still visible in Docker, it along with all other running containers becomes completely inaccessible. The only workaround is to restart Docker entirely.
...
Testcontainer Logs
...
Steps to Reproduce
-
Run tests using Jest.
-
Start a PostgreSQL container with the following setup:
const container = await new PostgreSqlContainer(image) .withDatabase(database) .withUsername(username) .withPassword(password) .withExposedPorts(5432).withWaitStrategy(Wait.forLogMessage('database system is ready to accept connections', 1)) .start() -
While the tests are running, press Ctrl+C to forcibly terminate the process.
-
Re-run the tests. They now fail, and all Docker containers become unreachable.
Environment Information
- Operating System:Windows 10
- Docker Version:Docker version 26.1.1, build 4cf5afa
- Node version:v20.15.0
- Testcontainers version:11.0.3