Skip to content

Commit

Permalink
fix: add timeout for failing tests (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Feb 5, 2020
1 parent b04cfb9 commit 77fdafa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ func TestContainerCreationAndWaitForListeningPortLongEnough(t *testing.T) {
ExposedPorts: []string{
nginxPort,
},
WaitingFor: wait.ForListeningPort("80"), // default startupTimeout is 60s
WaitingFor: wait.ForListeningPort("80").WithStartupTimeout(120 * time.Second),
},
Started: true,
})
Expand Down Expand Up @@ -798,7 +798,7 @@ func TestContainerCreationWaitingForHostPort(t *testing.T) {
req := ContainerRequest{
Image: "nginx:1.17.6",
ExposedPorts: []string{"80/tcp"},
WaitingFor: wait.ForListeningPort("80/tcp"),
WaitingFor: wait.ForListeningPort("80/tcp").WithStartupTimeout(120 * time.Second),
}
nginx, err := GenericContainer(ctx, GenericContainerRequest{
ContainerRequest: req,
Expand Down Expand Up @@ -850,7 +850,7 @@ func TestContainerCreationWaitsForLogAndPort(t *testing.T) {
},
WaitingFor: wait.ForAll(
wait.ForLog("port: 3306 MySQL Community Server - GPL"),
wait.ForListeningPort("3306/tcp"),
wait.ForListeningPort("3306/tcp").WithStartupTimeout(120*time.Second),
),
}

Expand Down

0 comments on commit 77fdafa

Please sign in to comment.