clebertsuconic commented on a change in pull request #3969:
URL: https://github.com/apache/activemq-artemis/pull/3969#discussion_r817935136
##########
File path:
tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java
##########
@@ -123,4 +124,20 @@ public void testAutoStart() throws Exception {
assertTrue(server.getRemotingService().getAcceptor("start").isStarted());
assertFalse(server.getRemotingService().getAcceptor("noStart").isStarted());
}
+
+ @Test
+ public void testActualPort() throws Exception {
+ String acceptor1Name = RandomUtil.randomString();
+ String acceptor2Name = RandomUtil.randomString();
+ String acceptor3Name = RandomUtil.randomString();
+ ActiveMQServer server = createServer(false, createDefaultInVMConfig());
+ server.getConfiguration().addAcceptorConfiguration(acceptor1Name,
"tcp://127.0.0.1:0");
+ server.getConfiguration().addAcceptorConfiguration(acceptor2Name,
"tcp://127.0.0.1:0");
+ server.getConfiguration().addAcceptorConfiguration(acceptor3Name,
"tcp://127.0.0.1:61616");
+ server.start();
Review comment:
Are you sure the activation here is not asynchronous? meaning you should
use a Wait.assertTrue... or perhaps a Wait.assertTrue(server::isActive) before
you check the next assertions?
just trying to avoid an intermittent test failure here due to the async
start.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]