This closes #2600
This commit is contained in:
commit
279f65586d
|
@ -126,9 +126,6 @@ public abstract class VersionedStompFrameHandler {
|
||||||
try {
|
try {
|
||||||
StompPostReceiptFunction postProcessFunction = onSubscribe(request);
|
StompPostReceiptFunction postProcessFunction = onSubscribe(request);
|
||||||
response = postprocess(request);
|
response = postprocess(request);
|
||||||
if (request.hasHeader(Stomp.Headers.RECEIPT_REQUESTED)) {
|
|
||||||
response.addHeader(Stomp.Headers.Response.RECEIPT_ID, request.getHeader(Stomp.Headers.RECEIPT_REQUESTED));
|
|
||||||
}
|
|
||||||
connection.sendFrame(response, postProcessFunction);
|
connection.sendFrame(response, postProcessFunction);
|
||||||
return null;
|
return null;
|
||||||
} catch (ActiveMQStompException e) {
|
} catch (ActiveMQStompException e) {
|
||||||
|
|
|
@ -33,6 +33,7 @@ import java.util.UUID;
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import org.apache.activemq.artemis.api.core.RoutingType;
|
import org.apache.activemq.artemis.api.core.RoutingType;
|
||||||
import org.apache.activemq.artemis.api.core.SimpleString;
|
import org.apache.activemq.artemis.api.core.SimpleString;
|
||||||
|
@ -97,6 +98,16 @@ public class StompV12Test extends StompTestBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSubscribeWithReceipt() throws Exception {
|
||||||
|
conn.connect(defUser, defPass);
|
||||||
|
|
||||||
|
Pattern p = Pattern.compile("receipt-id:.*\\nreceipt-id");
|
||||||
|
assertFalse(p.matcher(subscribe(conn, null).toString()).find());
|
||||||
|
|
||||||
|
conn.disconnect();
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testConnection() throws Exception {
|
public void testConnection() throws Exception {
|
||||||
server.getSecurityStore().setSecurityEnabled(true);
|
server.getSecurityStore().setSecurityEnabled(true);
|
||||||
|
|
Loading…
Reference in New Issue