Try to stabilize build by giving Cassandra longer to start

pull/12960/head
Andy Wilkinson 7 years ago
parent 6c504a5098
commit f39cea0428

@ -16,6 +16,7 @@
package org.springframework.boot.testsupport.testcontainers;
import java.time.Duration;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
@ -37,10 +38,9 @@ public class CassandraContainer extends Container {
private static final int PORT = 9042;
public CassandraContainer() {
super("cassandra:3.11.1", PORT,
(container) -> container
.waitingFor(new WaitStrategy(container.getMappedPort(PORT)))
.withStartupAttempts(3));
super("cassandra:3.11.1", PORT, (container) -> container
.waitingFor(new WaitStrategy(container.getMappedPort(PORT)))
.withStartupAttempts(3).withStartupTimeout(Duration.ofSeconds(60)));
}
private static class WaitStrategy extends HostPortWaitStrategy {

Loading…
Cancel
Save