Commit 1a1a62b7 authored by Andy Wilkinson's avatar Andy Wilkinson

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.
parent 29202593
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment