nbrendah commented on a change in pull request #3801:
URL: https://github.com/apache/activemq-artemis/pull/3801#discussion_r733856808



##########
File path: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AddressControlTest.java
##########
@@ -580,6 +590,111 @@ public void testPurge() throws Exception {
       Wait.assertEquals(0L, () -> addressControl.getMessageCount(), 2000, 100);
    }
 
+   @Test
+   public void testReplayWithoutDate() throws Exception {
+      testReplaySimple(false);
+   }
+
+   @Test
+   public void testReplayWithDate() throws Exception {
+      testReplaySimple(true);
+   }
+
+   private void testReplaySimple(boolean useDate) throws Exception {
+      SimpleString address = RandomUtil.randomSimpleString();
+
+      AddressControl addressControl = createManagementControl(address);
+      String queue = "testQueue" + RandomUtil.randomString();
+      server.addAddressInfo(new 
AddressInfo(queue).addRoutingType(RoutingType.ANYCAST));
+      server.createQueue(new 
QueueConfiguration(queue).setRoutingType(RoutingType.ANYCAST).setAddress(queue));
+
+      ConnectionFactory factory = CFUtil.createConnectionFactory("core", 
"tcp://localhost:61616");
+      try (Connection connection = factory.createConnection()) {
+         Session session = connection.createSession(false, 
Session.AUTO_ACKNOWLEDGE);

Review comment:
       Hey @clebertsuconic 
   I tend to feel as if i am creating a duplication of the `session` object 
here.  
   Should i just reuse the existing `ClientSession.session` variable declared 
as a variable?
   
   I am still willing to make more changes if it is not working out right.




-- 
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]


Reply via email to