diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestWithInterceptors.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestWithInterceptors.java index 9bb9bf21b9..206e4edcf7 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestWithInterceptors.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestWithInterceptors.java @@ -29,6 +29,7 @@ import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger; import org.apache.activemq.artemis.tests.integration.stomp.util.ClientStompFrame; import org.apache.activemq.artemis.tests.integration.stomp.util.StompClientConnection; import org.apache.activemq.artemis.tests.integration.stomp.util.StompClientConnectionFactory; +import org.apache.activemq.artemis.tests.util.Wait; import org.junit.Assert; import org.junit.Test; @@ -105,7 +106,13 @@ public class StompTestWithInterceptors extends StompTestBase { Thread.sleep(10); } + Wait.waitFor(() -> { + return MyIncomingStompFrameInterceptor.incomingInterceptedFrames.size() == 4; + }); Assert.assertEquals(4, MyIncomingStompFrameInterceptor.incomingInterceptedFrames.size()); + Wait.waitFor(() -> { + return MyOutgoingStompFrameInterceptor.outgoingInterceptedFrames.size() == 3; + }); Assert.assertEquals(3, MyOutgoingStompFrameInterceptor.outgoingInterceptedFrames.size()); for (int i = 0; i < MyIncomingStompFrameInterceptor.incomingInterceptedFrames.size(); i++) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/AbstractStompClientConnection.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/AbstractStompClientConnection.java index fa1ec7385f..707c8a17bd 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/AbstractStompClientConnection.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/AbstractStompClientConnection.java @@ -78,7 +78,7 @@ public abstract class AbstractStompClientConnection implements StompClientConnec private ClientStompFrame sendFrameInternal(ClientStompFrame frame, boolean wicked) throws IOException, InterruptedException { ClientStompFrame response = null; - IntegrationTestLogger.LOGGER.info("Sending " + (wicked ? "*wicked* " : "") + "frame:\n" + frame); + IntegrationTestLogger.LOGGER.trace("Sending " + (wicked ? "*wicked* " : "") + "frame:\n" + frame); ByteBuffer buffer; if (wicked) { buffer = frame.toByteBufferWithExtra("\n"); @@ -103,7 +103,7 @@ public abstract class AbstractStompClientConnection implements StompClientConnec } } - IntegrationTestLogger.LOGGER.info("Received:\n" + response); + IntegrationTestLogger.LOGGER.trace("Received:\n" + response); return response; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompClientConnectionV11.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompClientConnectionV11.java index cfc8f92080..6ef88cb653 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompClientConnectionV11.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompClientConnectionV11.java @@ -81,7 +81,7 @@ public class StompClientConnectionV11 extends StompClientConnectionV10 { this.passcode = passcode; this.connected = true; } else { - System.out.println("Connection failed with frame " + response); + System.err.println("Connection failed with frame " + response); connected = false; } }