Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ export class GenericContainer implements TestContainer {
if (!inspectResult.State.Running) {
log.debug("Reused container is not running, attempting to start it");
await client.container.start(container);
inspectResult = await inspectContainerUntilPortsExposed(() => client.container.inspect(container), container.id);
inspectResult = await inspectContainerUntilPortsExposed(
() => client.container.inspect(container),
container.id,
this.startupTimeoutMs
);
}

const mappedInspectResult = mapInspectResult(inspectResult);
Expand Down Expand Up @@ -217,7 +221,8 @@ export class GenericContainer implements TestContainer {

const inspectResult = await inspectContainerUntilPortsExposed(
() => client.container.inspect(container),
container.id
container.id,
this.startupTimeoutMs

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add a regression test for the timeout path

This bug fix changes GenericContainer.start() behavior, but there is no test proving that a custom withStartupTimeout() lets the port-binding pre-wait run past the utility's 10s default; a future refactor could silently reintroduce the cap. Please add a focused regression test around this startup path that fails before the change and passes after it.

AGENTS.md reference: AGENTS.md:L29-L34

Useful? React with 👍 / 👎.

);
const mappedInspectResult = mapInspectResult(inspectResult);
const boundPorts = BoundPorts.fromInspectResult(client.info.containerRuntime.hostIps, mappedInspectResult).filter(
Expand Down