Closed mhalbritter closed 1 week ago
The problem can be reproduced without Boot in a minimal unit test:
package com.example;
import static org.assertj.core.api.Assertions.assertThatRuntimeException;
import java.io.IOException;
import java.net.BindException;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import org.junit.jupiter.api.Test;
import io.undertow.Undertow;
class UndertowTests {
@Test
void startWithPortClashOnSecondHttpListenerThrowsRuntimeException() throws IOException {
try (ServerSocket socket = new ServerSocket()) {
socket.bind(new InetSocketAddress("0.0.0.0", 0));
int clashPort = socket.getLocalPort();
Undertow undertow = Undertow.builder()
.addHttpListener(0, "0.0.0.0")
.addHttpListener(clashPort, "0.0.0.0").build();
try {
assertThatRuntimeException().isThrownBy(undertow::start).withCauseInstanceOf(BindException.class);
}
finally {
undertow.stop();
}
}
}
}
I've opened https://issues.redhat.com/browse/UNDERTOW-2420. I think we should prohibit upgrades to 2.3.14.Final.
Closed by c05a40f180d3a6048ad2099b16039373624348eb.
Unfortunately, Undertow 2.3.14 hangs regularly when it's being stopped in one of our integration tests:
I think we need to revert this, for now at least.