Skip to content

Commit 6d471ad

Browse files
committed
Polish postgresml autoconfiguration IT
1 parent 9dcf003 commit 6d471ad

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

spring-ai-spring-boot-autoconfigure/src/test/java/org/springframework/ai/autoconfigure/postgresml/PostgresMlAutoConfigurationIT.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.junit.jupiter.api.Test;
2525
import org.testcontainers.containers.PostgreSQLContainer;
2626
import org.testcontainers.containers.wait.strategy.LogMessageWaitStrategy;
27+
import org.testcontainers.containers.wait.strategy.Wait;
2728
import org.testcontainers.junit.jupiter.Container;
2829
import org.testcontainers.junit.jupiter.Testcontainers;
2930
import org.testcontainers.utility.DockerImageName;
@@ -54,12 +55,10 @@ public class PostgresMlAutoConfigurationIT {
5455
static PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>(
5556
DockerImageName.parse("ghcr.io/postgresml/postgresml:2.8.1").asCompatibleSubstituteFor("postgres"))
5657
.withCommand("sleep", "infinity")
57-
.withLabel("org.springframework.boot.service-connection", "postgres")
5858
.withUsername("postgresml")
5959
.withPassword("postgresml")
6060
.withDatabaseName("postgresml")
61-
.waitingFor(new LogMessageWaitStrategy().withRegEx(".*Starting dashboard.*\\s")
62-
.withStartupTimeout(Duration.of(60, ChronoUnit.SECONDS)));
61+
.waitingFor(Wait.forLogMessage(".*Starting dashboard.*\\s", 1));
6362

6463
@Autowired
6564
JdbcTemplate jdbcTemplate;

0 commit comments

Comments
 (0)