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:
parent
7d6ab48763
commit
aab1c484b2
|
@ -3234,7 +3234,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
|
||||||
peer.remoteDetach().withClosed(true)
|
peer.remoteDetach().withClosed(true)
|
||||||
.withErrorCondition(AmqpError.NOT_FOUND.toString(), "Address not found")
|
.withErrorCondition(AmqpError.NOT_FOUND.toString(), "Address not found")
|
||||||
.queue();
|
.queue();
|
||||||
peer.expectFlow();
|
peer.expectFlow().optional();
|
||||||
peer.expectDetach();
|
peer.expectDetach();
|
||||||
|
|
||||||
// Triggers the initial attach based on demand.
|
// Triggers the initial attach based on demand.
|
||||||
|
|
|
@ -209,6 +209,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
|
||||||
peer.expectOpen().respond();
|
peer.expectOpen().respond();
|
||||||
peer.expectBegin().respond();
|
peer.expectBegin().respond();
|
||||||
peer.expectAttach().ofSender().withDesiredCapability(FEDERATION_CONTROL_LINK.toString()).respond();
|
peer.expectAttach().ofSender().withDesiredCapability(FEDERATION_CONTROL_LINK.toString()).respond();
|
||||||
|
peer.expectClose().optional(); // Can sometimes be sent
|
||||||
peer.expectConnectionToDrop();
|
peer.expectConnectionToDrop();
|
||||||
peer.start();
|
peer.start();
|
||||||
|
|
||||||
|
|
|
@ -3476,7 +3476,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
|
||||||
peer.remoteDetach().withClosed(true)
|
peer.remoteDetach().withClosed(true)
|
||||||
.withErrorCondition(AmqpError.NOT_FOUND.toString(), "Queue not found")
|
.withErrorCondition(AmqpError.NOT_FOUND.toString(), "Queue not found")
|
||||||
.queue();
|
.queue();
|
||||||
peer.expectFlow();
|
peer.expectFlow().optional();
|
||||||
peer.expectDetach();
|
peer.expectDetach();
|
||||||
|
|
||||||
final ConnectionFactory factory = CFUtil.createConnectionFactory("AMQP", "tcp://localhost:" + AMQP_PORT);
|
final ConnectionFactory factory = CFUtil.createConnectionFactory("AMQP", "tcp://localhost:" + AMQP_PORT);
|
||||||
|
|
Loading…
Reference in New Issue