Skip to content
Permalink
Browse files
NO-JIRA stopping object on finalize on openWire test
trying to avoid a few test failure seen on CI
  • Loading branch information
clebertsuconic committed Apr 29, 2022
1 parent 48cd586 commit 1dbbad5582d2d504a0aeac9499d52677223ba763
Showing 1 changed file with 21 additions and 14 deletions.
@@ -37,23 +37,30 @@ public void testDefaultPropertiesSetOnTransport() throws Exception {
TcpTransportServer server = (TcpTransportServer) TransportFactory.bind(new URI("tcp://localhost:61616?trace=true"));
server.setTransportOption(new HashMap<String, Object>());

server.setAcceptListener(new TransportAcceptListener() {
@Override
public void onAccept(Transport transport) {
assertTrue("This transport does not have a TransportLogger!!", hasTransportLogger(transport));
}
try {
server.setAcceptListener(new TransportAcceptListener() {
@Override
public void onAccept(Transport transport) {
assertTrue("This transport does not have a TransportLogger!!", hasTransportLogger(transport));
}

@Override
public void onAcceptError(Exception error) {
fail("Should not have received an error!");
}
});
@Override
public void onAcceptError(Exception error) {
fail("Should not have received an error!");
}
});

server.start();
server.start();

Socket socket = new Socket("localhost", 61616);
server.handleSocket(socket);
server.stop();
Socket socket = new Socket("localhost", 61616);
server.handleSocket(socket);
} finally {
try {
server.stop();
} catch (Throwable e) {
e.printStackTrace();
}
}

}

0 comments on commit 1dbbad5

Please sign in to comment.