File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
hsweb-easy-orm-rdb/src/test/java/org/hswebframework/ezorm/rdb Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 44import org .testcontainers .containers .wait .strategy .Wait ;
55import org .testcontainers .utility .DockerImageName ;
66
7+ import java .time .Duration ;
8+
79public class Containers {
810
911 public static GenericContainer <?> newMysql (String version ) {
@@ -32,7 +34,7 @@ public static GenericContainer<?> newOracle() {
3234 return new GenericContainer <>(DockerImageName .parse ("iatebes/oracle_11g" ))
3335 .withEnv ("TZ" , "Asia/Shanghai" )
3436 .withExposedPorts (1521 )
35- .waitingFor (Wait .forLogMessage (".*opened.*" , 1 ));
37+ .waitingFor (Wait .forLogMessage (".*opened.*" , 1 ). withStartupTimeout ( Duration . ofMinutes ( 2 )) );
3638 }
3739
3840 public static GenericContainer <?> newMSSQL () {
@@ -42,7 +44,7 @@ public static GenericContainer<?> newMSSQL() {
4244 .withEnv ("ACCEPT_EULA" ,"y" )
4345 .withEnv ("MSSQL_PID" ,"Enterprise" )
4446 .withExposedPorts (1433 )
45- .waitingFor (Wait .forLogMessage (".*Service Broker manager has started.*" ,1 ));
47+ .waitingFor (Wait .forLogMessage (".*Service Broker manager has started.*" ,1 ). withStartupTimeout ( Duration . ofMinutes ( 2 )) );
4648 }
4749
4850}
You can’t perform that action at this time.
0 commit comments