NO-JIRA stopping object on finalize on openWire test

trying to avoid a few test failure seen on CI
This commit is contained in:
Clebert Suconic 2022-04-29 08:29:39 -04:00
parent 48cd586ac5
commit 1dbbad5582
1 changed files with 23 additions and 16 deletions

View File

@ -37,6 +37,7 @@ public class TcpTransportServerTest extends TestCase {
TcpTransportServer server = (TcpTransportServer) TransportFactory.bind(new URI("tcp://localhost:61616?trace=true"));
server.setTransportOption(new HashMap<String, Object>());
try {
server.setAcceptListener(new TransportAcceptListener() {
@Override
public void onAccept(Transport transport) {
@ -53,7 +54,13 @@ public class TcpTransportServerTest extends TestCase {
Socket socket = new Socket("localhost", 61616);
server.handleSocket(socket);
} finally {
try {
server.stop();
} catch (Throwable e) {
e.printStackTrace();
}
}
}