1616
1717package org .springframework .ai .postgresml ;
1818
19- import java .time .Duration ;
20- import java .time .temporal .ChronoUnit ;
2119import java .util .List ;
2220import java .util .Map ;
2321
2826import org .junit .jupiter .params .ParameterizedTest ;
2927import org .junit .jupiter .params .provider .ValueSource ;
3028import org .testcontainers .containers .PostgreSQLContainer ;
31- import org .testcontainers .containers .wait .strategy .LogMessageWaitStrategy ;
29+ import org .testcontainers .containers .wait .strategy .Wait ;
3230import org .testcontainers .junit .jupiter .Container ;
3331import org .testcontainers .junit .jupiter .Testcontainers ;
3432import org .testcontainers .utility .DockerImageName ;
5149
5250/**
5351 * @author Toshiaki Maki
52+ * @author Eddú Meléndez
5453 */
5554@ JdbcTest (properties = "logging.level.sql=TRACE" )
5655@ AutoConfigureTestDatabase (replace = AutoConfigureTestDatabase .Replace .NONE )
@@ -63,12 +62,10 @@ class PostgresMlEmbeddingModelIT {
6362 static PostgreSQLContainer <?> postgres = new PostgreSQLContainer <>(
6463 DockerImageName .parse ("ghcr.io/postgresml/postgresml:2.8.1" ).asCompatibleSubstituteFor ("postgres" ))
6564 .withCommand ("sleep" , "infinity" )
66- .withLabel ("org.springframework.boot.service-connection" , "postgres" )
6765 .withUsername ("postgresml" )
6866 .withPassword ("postgresml" )
6967 .withDatabaseName ("postgresml" )
70- .waitingFor (new LogMessageWaitStrategy ().withRegEx (".*Starting dashboard.*\\ s" )
71- .withStartupTimeout (Duration .of (60 , ChronoUnit .SECONDS )));
68+ .waitingFor (Wait .forLogMessage (".*Starting dashboard.*\\ s" , 1 ));
7269
7370 @ Autowired
7471 JdbcTemplate jdbcTemplate ;
0 commit comments