Skip to content

Commit

Permalink
fix test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Nephery committed Nov 19, 2024
1 parent 4a59454 commit a68a3b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.Spy;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.cloud.stream.binder.BinderHeaders;
import org.springframework.cloud.stream.binder.ExtendedProducerProperties;
Expand Down Expand Up @@ -69,7 +70,7 @@ public class JCSMPOutboundMessageHandlerTest {
private ArgumentCaptor<ProducerFlowProperties> producerFlowPropertiesCaptor;
private ExtendedProducerProperties<SolaceProducerProperties> producerProperties;
private JCSMPSessionProducerManager sessionProducerManager;
@Mock private JCSMPProperties jcsmpProperties;
@Spy private JCSMPProperties jcsmpProperties = new JCSMPProperties();
@Mock private JCSMPSession session;
@Mock private TransactedSession transactedSession;
@Mock private XMLMessageProducer messageProducer;
Expand Down Expand Up @@ -589,8 +590,8 @@ public void testJCSMPPropertiesInheritanceWorkaround(
@Values(strings = {
JCSMPProperties.SUPPORTED_ACK_EVENT_MODE_PER_MSG,
JCSMPProperties.SUPPORTED_ACK_EVENT_MODE_WINDOWED}) String ackEventMode) {
Mockito.when(session.getProperty(JCSMPProperties.PUB_ACK_WINDOW_SIZE)).thenReturn(pubAckWindowSize);
Mockito.when(session.getProperty(JCSMPProperties.ACK_EVENT_MODE)).thenReturn(ackEventMode);
jcsmpProperties.setProperty(JCSMPProperties.PUB_ACK_WINDOW_SIZE, pubAckWindowSize);
jcsmpProperties.setProperty(JCSMPProperties.ACK_EVENT_MODE, ackEventMode);
messageHandler.start();

assertThat(producerFlowPropertiesCaptor.getValue())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ protected MessageHandler createProducerMessageHandler(ProducerDestination destin
JCSMPOutboundMessageHandler handler = new JCSMPOutboundMessageHandler(
destination,
jcsmpSession,
jcsmpProperties,
errorChannel,
sessionProducerManager,
producerProperties,
Expand Down

0 comments on commit a68a3b6

Please sign in to comment.