diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPFederationAddressPolicyTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPFederationAddressPolicyTest.java index 4f9dfe18f1..6e82e370b9 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPFederationAddressPolicyTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPFederationAddressPolicyTest.java @@ -3155,7 +3155,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(); server.createQueue(new QueueConfiguration("test").setRoutingType(RoutingType.MULTICAST) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPFederationQueuePolicyTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPFederationQueuePolicyTest.java index 4cb32f385d..f32e032c4a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPFederationQueuePolicyTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPFederationQueuePolicyTest.java @@ -3394,7 +3394,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);