brusdev commented on code in PR #4737:
URL: https://github.com/apache/activemq-artemis/pull/4737#discussion_r1447721527
##########
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateTest.java:
##########
@@ -381,26 +382,36 @@ public void testCleanupAfterReboot(String protocol,
boolean useDelay) throws Exc
try (Connection connection = cf.createConnection()) {
Session session = connection.createSession(false,
Session.AUTO_ACKNOWLEDGE);
Queue queue = session.createQueue(QUEUE_NAME);
- MessageProducer producer = session.createProducer(queue);
- producer.send(session.createTextMessage(randomString));
+ Topic topic = session.createTopic(TOPIC_NAME);
+ MessageProducer producer = session.createProducer(null);
+ producer.send(queue, session.createTextMessage(randomString));
+ producer.send(topic, session.createTextMessage(randomString));
}
info =
server.getPostOffice().getAddressInfo(SimpleString.toSimpleString(QUEUE_NAME));
Assert.assertNotNull(info);
Assert.assertTrue(info.isAutoCreated());
+ info =
server.getPostOffice().getAddressInfo(SimpleString.toSimpleString(TOPIC_NAME));
+ Assert.assertNotNull(info);
+ Assert.assertTrue(info.isAutoCreated());
+
server.stop();
try (AssertionLoggerHandler loggerHandler = new
AssertionLoggerHandler()) {
server.start();
- Assert.assertFalse(loggerHandler.findText("AMQ224113")); // this time
around the queue had messages, it has to exist
+ Assert.assertFalse(loggerHandler.matchText("AMQ224113.*" +
QUEUE_NAME)); // this time around the queue had messages, it has to exist
+ Assert.assertTrue(loggerHandler.matchText("AMQ224113.*" +
TOPIC_NAME)); // this time around the queue had messages, it has to exist
Review Comment:
@tabish121 good catch, I changed the comments.
--
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]