Skip to content

Commit 3014b92

Browse files
committed
Added startup timeout for container
1 parent a1a7d44 commit 3014b92

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/test/java/io/github/jopenlibs/vault/util/VaultContainer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import java.io.File;
1111
import java.io.IOException;
1212
import java.net.HttpURLConnection;
13+
import java.time.Duration;
1314
import java.util.Optional;
1415
import org.slf4j.Logger;
1516
import org.slf4j.LoggerFactory;
@@ -70,6 +71,7 @@ public VaultContainer(String image) {
7071
.forPort(8280)
7172
.forPath("/v1/sys/seal-status")
7273
.forStatusCode(HttpURLConnection.HTTP_OK)
74+
.withStartupTimeout(Duration.ofMinutes(5))
7375
// The expected response when "vault init" has not yet run
7476
);
7577
}

0 commit comments

Comments
 (0)