Skip to content

Commit

Permalink
make unit for startup timeout more obvious (#437)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdunisch committed Feb 14, 2023
1 parent ef28476 commit 5a033cd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ const { GenericContainer } = require("testcontainers");
const container = await new GenericContainer("redis")
.withExposedPorts(6379)
.withStartupTimeout(120000)
.withStartupTimeout(120000) // wait 120s
.start();
```

Expand Down
4 changes: 2 additions & 2 deletions src/generic-container/generic-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ export class GenericContainer implements TestContainer {
return this;
}

public withStartupTimeout(startupTimeout: number): this {
this.startupTimeout = startupTimeout;
public withStartupTimeout(startupTimeoutMs: number): this {
this.startupTimeout = startupTimeoutMs;
return this;
}

Expand Down
2 changes: 1 addition & 1 deletion src/test-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export interface TestContainer {

withWaitStrategy(waitStrategy: WaitStrategy): this;

withStartupTimeout(startupTimeout: number): this;
withStartupTimeout(startupTimeoutMs: number): this;

withNetwork(network: StartedNetwork): this;

Expand Down

0 comments on commit 5a033cd

Please sign in to comment.