Skip to content

Commit bfc24c7

Browse files
committed
tired of flaky tests, inc wait strategy timeouts
1 parent 95ef837 commit bfc24c7

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

lib/container/mysql_container.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ defmodule Testcontainers.Container.MySqlContainer do
7979
"-c",
8080
"mysqladmin ping --user='#{username}' --password='#{password}' -h localhost | grep 'mysqld is alive'"
8181
],
82-
30_000
82+
60_000
8383
)
8484
end
8585
end

lib/container/postgres_container.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ defmodule Testcontainers.Container.PostgresContainer do
7272
defp wait_strategy(username, database) do
7373
CommandWaitStrategy.new(
7474
["sh", "-c", "pg_isready -U #{username} -d #{database} -h localhost"],
75-
15000
75+
60_000
7676
)
7777
end
7878
end

lib/container/redis_container.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ defmodule Testcontainers.Container.RedisContainer do
1010
alias Testcontainers.WaitStrategy.CommandWaitStrategy
1111

1212
@redis_port 6379
13-
@wait_strategy CommandWaitStrategy.new(["redis-cli", "PING"])
13+
@wait_strategy CommandWaitStrategy.new(["redis-cli", "PING"], 60_000)
1414

1515
@doc """
1616
Creates a Redis container.

lib/container/selenium_container.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ defmodule Testcontainers.Container.SeleniumContainer do
1212
@default_image "selenium/standalone-chrome:latest"
1313
@log_regex ~r/.*(RemoteWebDriver instances should connect to|Selenium Server is up and running|Started Selenium Standalone).*\n/
1414
@wait_strategies [
15-
PortWaitStrategy.new("127.0.0.1", 4400, 15_000, 1000),
16-
PortWaitStrategy.new("127.0.0.1", 7900, 15_000, 1000),
15+
PortWaitStrategy.new("127.0.0.1", 4400, 60_000, 1000),
16+
PortWaitStrategy.new("127.0.0.1", 7900, 60_000, 1000),
1717
LogWaitStrategy.new(@log_regex, 120_000, 1000)
1818
]
1919

0 commit comments

Comments
 (0)