[ 
https://issues.apache.org/jira/browse/ARTEMIS-3523?focusedWorklogId=668542&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-668542
 ]

ASF GitHub Bot logged work on ARTEMIS-3523:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Oct/21 16:53
            Start Date: 21/Oct/21 16:53
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on a change in pull request 
#3801:
URL: https://github.com/apache/activemq-artemis/pull/3801#discussion_r733869721



##########
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:
       I don't mind about the Session duplicated really.. all I mind is you 
using the AddressControl




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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 668542)
    Time Spent: 5.5h  (was: 5h 20m)

> Expose replay through AddressControl
> ------------------------------------
>
>                 Key: ARTEMIS-3523
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3523
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>            Reporter: Clebert Suconic
>            Priority: Major
>              Labels: easy
>          Time Spent: 5.5h
>  Remaining Estimate: 0h
>
> Currently there is a method replay on ActiveMQServer with the following 
> signature:
> replay(address, .....)
> it should be a lot easier for our users to implement a method replay on the 
> ActiveMQServerControl
> such method should just call server.replay(this.address, .....)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to