jeanouii commented on code in PR #1621:
URL: https://github.com/apache/activemq/pull/1621#discussion_r2709835298
##########
activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/Stomp12Test.java:
##########
@@ -158,9 +159,32 @@ public void testClientAckWithoutAckId() throws Exception {
String frame = "ACK\n" + "message-id:" + ackId + "\n\n" + Stomp.NULL;
stompConnection.sendFrame(frame);
+ // Unsubscribe immediately to prevent message redelivery while waiting
for ERROR
+ String unsubscribe = "UNSUBSCRIBE\n" + "id:1\n\n" + Stomp.NULL;
+ stompConnection.sendFrame(unsubscribe);
+
+ // Receive frames until we get the ERROR frame, ignoring any MESSAGE
frames
+ // that arrive due to redelivery (especially relevant for SSL
transport)
+ StompFrame error = null;
+ for (int i = 0; i < 5; i++) {
+ error = stompConnection.receive();
Review Comment:
applied
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact