This is an automated email from the ASF dual-hosted git repository.

jbertram pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new 4122167c35 ARTEMIS-5221 STOMP test client formats heart-beats 
incorrectly
4122167c35 is described below

commit 4122167c35319814460ee8c671225454796b1beb
Author: Justin Bertram <[email protected]>
AuthorDate: Tue Dec 17 14:55:53 2024 -0600

    ARTEMIS-5221 STOMP test client formats heart-beats incorrectly
---
 .../integration/stomp/util/AbstractStompClientConnection.java    | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git 
a/tests/artemis-test-support/src/main/java/org/apache/activemq/artemis/tests/integration/stomp/util/AbstractStompClientConnection.java
 
b/tests/artemis-test-support/src/main/java/org/apache/activemq/artemis/tests/integration/stomp/util/AbstractStompClientConnection.java
index 2e23b81a32..cf6d129205 100644
--- 
a/tests/artemis-test-support/src/main/java/org/apache/activemq/artemis/tests/integration/stomp/util/AbstractStompClientConnection.java
+++ 
b/tests/artemis-test-support/src/main/java/org/apache/activemq/artemis/tests/integration/stomp/util/AbstractStompClientConnection.java
@@ -130,7 +130,13 @@ public abstract class AbstractStompClientConnection 
implements StompClientConnec
       if (wicked) {
          buffer = frame.toByteBufferWithExtra("\n");
       } else {
-         buffer = frame.toByteBuffer();
+         if (frame.isPing()) {
+            buffer = ByteBuffer.allocateDirect(1);
+            buffer.put((byte) 10);
+            buffer.rewind();
+         } else {
+            buffer = frame.toByteBuffer();
+         }
       }
 
       ByteBuf buf = Unpooled.copiedBuffer(buffer);
@@ -361,7 +367,6 @@ public abstract class AbstractStompClientConnection 
implements StompClientConnec
       Pinger(long interval) {
          this.pingInterval = interval;
          pingFrame = createFrame(Stomp.Commands.STOMP);
-         pingFrame.setBody("\n");
          pingFrame.setForceOneway();
          pingFrame.setPing(true);
       }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to