|
19 | 19 | import static org.assertj.core.api.Assertions.assertThat; |
20 | 20 | import static org.mockito.ArgumentMatchers.any; |
21 | 21 | import static org.mockito.ArgumentMatchers.anyLong; |
| 22 | +import static org.mockito.ArgumentMatchers.eq; |
22 | 23 | import static org.mockito.ArgumentMatchers.isNull; |
23 | 24 | import static org.mockito.BDDMockito.given; |
24 | 25 | import static org.mockito.BDDMockito.willAnswer; |
@@ -549,7 +550,7 @@ public void testRecordAckMockForeignThreadImmediate() throws Exception { |
549 | 550 | private void testRecordAckMockForeignThreadGuts(AckMode ackMode) throws Exception { |
550 | 551 | ConsumerFactory<Integer, String> cf = mock(ConsumerFactory.class); |
551 | 552 | Consumer<Integer, String> consumer = mock(Consumer.class); |
552 | | - given(cf.createConsumer(isNull(), eq("clientId"), isNull())).willReturn(consumer); |
| 553 | + given(cf.createConsumer(isNull(), eq("clientId"))).willReturn(consumer); |
553 | 554 | final Map<TopicPartition, List<ConsumerRecord<Integer, String>>> records = new HashMap<>(); |
554 | 555 | records.put(new TopicPartition("foo", 0), Arrays.asList( |
555 | 556 | new ConsumerRecord<>("foo", 0, 0L, 1, "foo"), |
@@ -591,9 +592,9 @@ public void onMessage(ConsumerRecord<Integer, String> data, Acknowledgment ackno |
591 | 592 | ).given(consumer).commitSync(any(Map.class)); |
592 | 593 |
|
593 | 594 | containerProps.setMessageListener(messageListener); |
594 | | - containerProps.setClientId("clientId"); |
595 | 595 | KafkaMessageListenerContainer<Integer, String> container = |
596 | 596 | new KafkaMessageListenerContainer<>(cf, containerProps); |
| 597 | + container.setClientIdSuffix("clientId"); |
597 | 598 | container.start(); |
598 | 599 | assertThat(latch.await(10, TimeUnit.SECONDS)).isTrue(); |
599 | 600 | acks.get(1).acknowledge(); |
|
0 commit comments