Protect tests against Cassandra startup failures
On CI, Cassandra running inside the Docker container sometimes fails to start or the start times out. This has nothing to do with Boot so we attempt to protect our tests from the flakiness of the container by allowing 3 startup attempts.
This commit is contained in:
@@ -37,8 +37,8 @@ public class CassandraContainer extends Container {
|
||||
private static final int PORT = 9042;
|
||||
|
||||
public CassandraContainer() {
|
||||
super("cassandra:3.11.1", PORT,
|
||||
(container) -> container.waitingFor(new WaitStrategy()));
|
||||
super("cassandra:3.11.1", PORT, (container) -> container
|
||||
.waitingFor(new WaitStrategy()).withStartupAttempts(3));
|
||||
}
|
||||
|
||||
private static class WaitStrategy extends HostPortWaitStrategy {
|
||||
|
||||
Reference in New Issue
Block a user