Skip to content

Commit

Permalink
fix(redis): port race
Browse files Browse the repository at this point in the history
Fix race condition on port availability by switching to port instead of
log check.
  • Loading branch information
stevenh committed Aug 6, 2024
1 parent 8b42143 commit 9d424d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func Run(ctx context.Context, img string, opts ...testcontainers.ContainerCustom
req := testcontainers.ContainerRequest{
Image: img,
ExposedPorts: []string{"6379/tcp"},
WaitingFor: wait.ForLog("* Ready to accept connections"),
WaitingFor: wait.ForListeningPort("6379/tcp"),
}

genericContainerReq := testcontainers.GenericContainerRequest{
Expand Down

0 comments on commit 9d424d7

Please # to comment.