Skip to content

Commit 78bd3b9

Browse files
committed
fix(testcontainers): convert stop() timeouts to ms for v11 + drop stale tar-fs override
1 parent 5146f79 commit 78bd3b9

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

internal-packages/testcontainers/src/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export async function createRedisContainer({
9999
const [error] = await tryCatch(verifyRedisConnection(startedContainer));
100100

101101
if (error) {
102-
await startedContainer.stop({ timeout: 30 });
102+
await startedContainer.stop({ timeout: 30_000 });
103103
throw new Error("verifyRedisConnection error", { cause: error });
104104
}
105105

@@ -238,7 +238,7 @@ export async function useContainer<TContainer extends StartedTestContainer>(
238238
metadata.useDurationMs = useDurationMs;
239239
} finally {
240240
// WARNING: Testcontainers by default will not wait until the container has stopped. It will simply issue the stop command and return immediately.
241-
// If you need to wait for the container to be stopped, you can provide a timeout. The unit of timeout option here is second
242-
await logCleanup(name, container.stop({ timeout: 10 }), metadata);
241+
// If you need to wait for the container to be stopped, you can provide a timeout. The unit of timeout option here is milliseconds (changed from seconds in testcontainers v11)
242+
await logCleanup(name, container.stop({ timeout: 10_000 }), metadata);
243243
}
244244
}

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
"@types/node": "20.14.14",
9090
"express@^4>body-parser": "1.20.3",
9191
"@remix-run/dev@2.17.4>tar-fs": "2.1.4",
92-
"testcontainers@10.28.0>tar-fs": "3.1.1",
9392
"tar@>=7 <7.5.11": "^7.5.11",
9493
"form-data@^2": "2.5.4",
9594
"form-data@^3": "3.0.4",

pnpm-lock.yaml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)