Skip to content

Commit 2035fb0

Browse files
committed
Longer timeout for starting container to avoid flakiness
1 parent 6821d99 commit 2035fb0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

x-pack/test/smb-fixture/src/main/java/org/elasticsearch/test/fixtures/smb/SmbTestContainer.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
import org.testcontainers.containers.wait.strategy.WaitAllStrategy;
1515
import org.testcontainers.images.builder.ImageFromDockerfile;
1616

17+
import java.time.Duration;
18+
1719
public final class SmbTestContainer extends DockerEnvironmentAwareTestContainer {
1820

1921
private static final String DOCKER_BASE_IMAGE = "ubuntu:24.04";
@@ -46,7 +48,9 @@ public SmbTestContainer() {
4648
addExposedPort(AD_LDAP_GC_PORT);
4749

4850
setWaitStrategy(
49-
new WaitAllStrategy().withStrategy(Wait.forLogMessage(".*Samba started.*", 1)).withStrategy(Wait.forListeningPort())
51+
new WaitAllStrategy().withStartupTimeout(Duration.ofSeconds(120))
52+
.withStrategy(Wait.forLogMessage(".*Samba started.*", 1))
53+
.withStrategy(Wait.forListeningPort())
5054
);
5155

5256
getCreateContainerCmdModifiers().add(createContainerCmd -> {

0 commit comments

Comments
 (0)