Skip to content

Commit 9b97bfa

Browse files
committed
fix(mail): pin down HTTP Port in TC test for MailServiceBeanIT IQSS#11472
Without pinning down the port, sometimes Testcontainers thinks it should apply the waiting strategy on the SMTP port. Telling it explicitely which port to use fixes this.
1 parent f12323a commit 9b97bfa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/test/java/edu/harvard/iq/dataverse/MailServiceBeanIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static void setUp() {
7575
@Container
7676
static GenericContainer<?> maildev = new GenericContainer<>("dockage/mailcatcher")
7777
.withExposedPorts(PORT_HTTP, PORT_SMTP)
78-
.waitingFor(Wait.forHttp("/"));
78+
.waitingFor(Wait.forHttp("/").forPort(PORT_HTTP));
7979

8080
static String tcSmtpHost() {
8181
return maildev.getHost();

0 commit comments

Comments
 (0)