tabish121 commented on code in PR #5647:
URL: https://github.com/apache/activemq-artemis/pull/5647#discussion_r2056751023


##########
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPBridgeToAddressTest.java:
##########
@@ -178,35 +179,30 @@ public void 
testBridgeCreatesAddressSenderWhenLocalAddressIsStaticlyDefined() th
          // should be the thing that triggers the bridging. The connection 
should remain active and
          // respond if the address is recreated later.
          logger.info("Removing Address from bridged address to eliminate 
sender");
-         server.removeAddressInfo(SimpleString.of(getTestName()), null, true);
-
-         peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
+         server.removeAddressInfo(SimpleString.of(getTestName() + ".1"), null, 
true);
 
          Wait.assertFalse(() -> 
server.addressQuery(SimpleString.of(getTestName())).isExists());
 
+         peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
+
+         peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
          peer.expectAttach().ofSender()
-                            .withTarget().withAddress(getTestName()).also()
-                            .withSource().withAddress(getTestName()).also()
-                            .withName(allOf(containsString(getTestName()),
+                            .withTarget().withAddress(getTestName() + 
".2").also()
+                            .withSource().withAddress(getTestName() + 
".2").also()
+                            .withName(allOf(containsString(getTestName() + 
".2"),
                                             containsString("address-sender"),
                                             containsString("amqp-bridge"),
                                             
containsString(server.getNodeID().toString())))
                             .respond();
          peer.remoteFlow().withLinkCredit(1).queue();
 
-         final ConnectionFactory factory = 
CFUtil.createConnectionFactory("AMQP", "tcp://localhost:" + AMQP_PORT);
-
-         // Producer connect should create the address and initiate the bridge 
sender attach
-         try (Connection connection = factory.createConnection()) {
-            final Session session = 
connection.createSession(Session.AUTO_ACKNOWLEDGE);
-            session.createProducer(session.createTopic(getTestName()));
-
-            Wait.assertTrue(() -> 
server.addressQuery(SimpleString.of(getTestName())).isExists());
-            Wait.assertTrue(() -> 
server.bindingQuery(SimpleString.of(getTestName())).getQueueNames().size() > 0);
+         // Add another address that matches the filter and the bridge should 
form without a reconnect.
+         server.addAddressInfo(new AddressInfo(SimpleString.of(getTestName() + 
".2"), RoutingType.MULTICAST));
 
-            peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
-         }
+         Wait.assertTrue(() -> 
server.addressQuery(SimpleString.of(getTestName() + ".2")).isExists());

Review Comment:
   I would suggest making it work with defaults since expecting everyone to 
know what magic number to choose is not a strategy that can scale. 



-- 
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: gitbox-unsubscr...@activemq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org
For additional commands, e-mail: gitbox-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to