NO-JIRA Fix a few cases of federation test fails on unexpected frames

Add a couple optional flags for performatives that might arrive based on the
timing of connection close or remote detach etc.
This commit is contained in:
Timothy Bish 2024-05-28 14:26:17 -04:00
parent 7d6ab48763
commit aab1c484b2
3 changed files with 3 additions and 2 deletions

View File

@ -3234,7 +3234,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
peer.remoteDetach().withClosed(true)
.withErrorCondition(AmqpError.NOT_FOUND.toString(), "Address not found")
.queue();
peer.expectFlow();
peer.expectFlow().optional();
peer.expectDetach();
// Triggers the initial attach based on demand.

View File

@ -209,6 +209,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
peer.expectOpen().respond();
peer.expectBegin().respond();
peer.expectAttach().ofSender().withDesiredCapability(FEDERATION_CONTROL_LINK.toString()).respond();
peer.expectClose().optional(); // Can sometimes be sent
peer.expectConnectionToDrop();
peer.start();

View File

@ -3476,7 +3476,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
peer.remoteDetach().withClosed(true)
.withErrorCondition(AmqpError.NOT_FOUND.toString(), "Queue not found")
.queue();
peer.expectFlow();
peer.expectFlow().optional();
peer.expectDetach();
final ConnectionFactory factory = CFUtil.createConnectionFactory("AMQP", "tcp://localhost:" + AMQP_PORT);