File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
tests/integration/jms/src/test
java/io/helidon/messaging/connectors/jms Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 1919import java .lang .annotation .Annotation ;
2020import java .time .Duration ;
2121import java .util .List ;
22+ import java .util .concurrent .CompletableFuture ;
23+ import java .util .concurrent .CompletionStage ;
2224
2325import io .helidon .messaging .connectors .mock .MockConnector ;
2426import io .helidon .messaging .connectors .mock .TestConnector ;
@@ -83,15 +85,18 @@ public class AckMpTest extends AbstractMPTest {
8385 @ Incoming ("test-channel-ack-1" )
8486 @ Outgoing ("mock-conn-channel" )
8587 @ Acknowledgment (Acknowledgment .Strategy .MANUAL )
86- public Message <String > channelAck (Message <String > msg ) {
88+ public CompletionStage < Message <String > > channelAck (Message <String > msg ) {
8789 LOGGER .log (DEBUG , () -> String .format ("Received %s" , msg .getPayload ()));
8890 if (msg .getPayload ().startsWith ("NO_ACK" )) {
8991 LOGGER .log (DEBUG , () -> String .format ("NOT Acked %s" , msg .getPayload ()));
92+ return CompletableFuture .completedStage (msg );
9093 } else {
9194 LOGGER .log (DEBUG , () -> String .format ("Acked %s" , msg .getPayload ()));
92- msg .ack ();
95+ return msg .ack ().thenApply (unused -> {
96+ LOGGER .log (DEBUG , () -> String .format ("Ack of %s confirmed" , msg .getPayload ()));
97+ return msg ;
98+ });
9399 }
94- return msg ;
95100 }
96101
97102 @ Test
Original file line number Diff line number Diff line change 11#
2- # Copyright (c) 2020, 2023 Oracle and/or its affiliates.
2+ # Copyright (c) 2020, 2025 Oracle and/or its affiliates.
33#
44# Licensed under the Apache License, Version 2.0 (the "License");
55# you may not use this file except in compliance with the License.
@@ -19,6 +19,6 @@ handlers=io.helidon.logging.jul.HelidonConsoleHandler
1919java.util.logging.SimpleFormatter.format =%1$tY.%1$tm.%1$td %1$tH:%1$tM:%1$tS %4$s %3$s !thread!: %5$s%6$s%n
2020
2121# All log level details
22- .level =SEVERE
23- io.helidon.messaging.level =INFO
22+ .level =WARNING
23+ io.helidon.messaging.connectors.jms.AckMpTest. level =FINE
2424io.helidon.microprofile.level =INFO
You can’t perform that action at this time.
0 commit comments