Skip to content

Commit 0f2b7da

Browse files
committed
PR review
Signed-off-by: Soby Chacko <[email protected]>
1 parent 3fc40bb commit 0f2b7da

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

spring-kafka/src/main/java/org/springframework/kafka/core/DefaultShareConsumerFactory.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ public void addListener(Listener<K, V> listener) {
261261
* </p>
262262
* @param index the index (list position).
263263
* @param listener the listener to add.
264-
* @since 2.5
265264
*/
266265
@Override
267266
public void addListener(int index, Listener<K, V> listener) {

spring-kafka/src/test/java/org/springframework/kafka/core/DefaultShareConsumerFactoryTests.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,8 @@
3636
import org.apache.kafka.common.serialization.StringSerializer;
3737
import org.junit.jupiter.api.Test;
3838

39-
import org.springframework.beans.factory.annotation.Autowired;
4039
import org.springframework.kafka.test.EmbeddedKafkaBroker;
4140
import org.springframework.kafka.test.context.EmbeddedKafka;
42-
import org.springframework.test.annotation.DirtiesContext;
43-
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
4441

4542
import static org.assertj.core.api.Assertions.assertThat;
4643
import static org.assertj.core.api.Assertions.assertThatThrownBy;
@@ -59,13 +56,8 @@
5956
"share.coordinator.state.topic.replication.factor=1",
6057
"share.coordinator.state.topic.min.isr=1"
6158
})
62-
@SpringJUnitConfig
63-
@DirtiesContext
6459
class DefaultShareConsumerFactoryTests {
6560

66-
@Autowired
67-
private EmbeddedKafkaBroker embeddedKafka;
68-
6961
@Test
7062
void shouldInstantiateWithConfigs() {
7163
Map<String, Object> configs = new HashMap<>();
@@ -152,10 +144,10 @@ void shouldReturnUnmodifiableListenersList() {
152144
}
153145

154146
@Test
155-
void integrationTestDefaultShareConsumerFactory() throws Exception {
147+
void integrationTestDefaultShareConsumerFactory(EmbeddedKafkaBroker broker) throws Exception {
156148
final String topic = "embedded-share-test";
157149
final String groupId = "testGroup";
158-
var bootstrapServers = embeddedKafka.getBrokersAsString();
150+
var bootstrapServers = broker.getBrokersAsString();
159151

160152
var producerProps = new java.util.Properties();
161153
producerProps.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapServers);

0 commit comments

Comments
 (0)