clebertsuconic commented on code in PR #5647:
URL: https://github.com/apache/activemq-artemis/pull/5647#discussion_r2056747438
##########
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 tried in the past to chnage the default to 5 seconds... but for some
reason at the time it didn't work.. perhaps i could try again)
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact