@@ -3,6 +3,7 @@ package com.dimafeng.testcontainers
3
3
import java .util .concurrent .Future
4
4
5
5
import com .dimafeng .testcontainers .GenericContainer .{FileSystemBind , DockerImage }
6
+ import org .testcontainers .containers .startupcheck .StartupCheckStrategy
6
7
import org .testcontainers .containers .wait .strategy .WaitStrategy
7
8
import org .testcontainers .containers .{BindMode , GenericContainer => JavaGenericContainer }
8
9
import org .testcontainers .images .ImagePullPolicy
@@ -25,7 +26,8 @@ class GenericContainer(
25
26
labels : Map [String , String ] = Map .empty,
26
27
tmpFsMapping : Map [String , String ] = Map .empty,
27
28
imagePullPolicy : Option [ImagePullPolicy ] = None ,
28
- fileSystemBind : Seq [FileSystemBind ] = Seq ()
29
+ fileSystemBind : Seq [FileSystemBind ] = Seq (),
30
+ startupCheckStrategy : Option [StartupCheckStrategy ] = None
29
31
) = this ({
30
32
val underlying : JavaGenericContainer [_] = dockerImage match {
31
33
case DockerImage (Left (imageFromDockerfile)) => new JavaGenericContainer (imageFromDockerfile)
@@ -49,6 +51,8 @@ class GenericContainer(
49
51
}
50
52
waitStrategy.foreach(underlying.waitingFor)
51
53
54
+ startupCheckStrategy.foreach(underlying.withStartupCheckStrategy)
55
+
52
56
if (labels.nonEmpty) {
53
57
underlying.withLabels(labels.asJava)
54
58
}
0 commit comments