Skip to content

Commit a2a7349

Browse files
committed
Fix flaky Cassandra container test by using CommandWaitStrategy
1 parent bc8dfcb commit a2a7349

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/container/cassandra_container.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ defmodule Testcontainers.CassandraContainer do
55
"""
66

77
alias Testcontainers.CassandraContainer
8-
alias Testcontainers.LogWaitStrategy
8+
alias Testcontainers.CommandWaitStrategy
99
alias Testcontainers.ContainerBuilder
1010
alias Testcontainers.Container
1111

@@ -89,8 +89,8 @@ defmodule Testcontainers.CassandraContainer do
8989
|> with_environment(:CASSANDRA_ENDPOINT_SNITCH, "GossipingPropertyFileSnitch")
9090
|> with_environment(:CASSANDRA_DC, "datacenter1")
9191
|> with_waiting_strategy(
92-
LogWaitStrategy.new(
93-
~r/Starting listening for CQL clients on \/0\.0\.0\.0:#{CassandraContainer.default_port()}.*/,
92+
CommandWaitStrategy.new(
93+
["cqlsh", "-e", "describe keyspaces"],
9494
config.wait_timeout
9595
)
9696
)

0 commit comments

Comments
 (0)