Skip to content

Commit cbf949c

Browse files
authored
Update KafkaJunit dependency (#68)
1 parent e0d8ad4 commit cbf949c

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

kafka-webview-ui/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
<dependency>
135135
<groupId>com.salesforce.kafka.test</groupId>
136136
<artifactId>kafka-junit4</artifactId>
137-
<version>2.2.0</version>
137+
<version>3.0.0</version>
138138
<scope>test</scope>
139139
</dependency>
140140
<dependency>

kafka-webview-ui/src/test/java/org/sourcelab/kafka/webview/ui/manager/kafka/KafkaConsumerFactoryTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ public void testBasicConsumerMultiplePartitions() {
6565
// Create a topic with 2 partitions, (partitionId 0, 1)
6666
final String topicName = "TestTopic";
6767
sharedKafkaTestResource
68-
.getKafkaTestServer()
69-
.createTopic(topicName, 2);
68+
.getKafkaTestUtils()
69+
.createTopic(topicName, 2, (short) 1);
7070

7171
// Produce 10 records into partition 0 of topic.
7272
sharedKafkaTestResource
@@ -126,8 +126,8 @@ public void testBasicConsumerExcludePartitions() {
126126
// Create a topic with 2 partitions, (partitionId 0, 1)
127127
final String topicName = "TestTopic";
128128
sharedKafkaTestResource
129-
.getKafkaTestServer()
130-
.createTopic(topicName, 2);
129+
.getKafkaTestUtils()
130+
.createTopic(topicName, 2, (short) 1);
131131

132132
// Produce 10 records into partition 0 of topic.
133133
sharedKafkaTestResource
@@ -191,8 +191,8 @@ public void testBasicConsumerWithRecordFilter() throws InterruptedException {
191191
// Create a topic with 2 partitions, (partitionId 0, 1)
192192
final String topicName = "TestTopic";
193193
sharedKafkaTestResource
194-
.getKafkaTestServer()
195-
.createTopic(topicName, 2);
194+
.getKafkaTestUtils()
195+
.createTopic(topicName, 2, (short) 1);
196196

197197
// Produce 10 records into partition 0 of topic.
198198
sharedKafkaTestResource
@@ -263,8 +263,8 @@ public void testDeserializerOptions() throws InterruptedException {
263263
// Create a topic with 1 partitions, (partitionId 0)
264264
final String topicName = "TestTopic" + System.currentTimeMillis();
265265
sharedKafkaTestResource
266-
.getKafkaTestServer()
267-
.createTopic(topicName, 1);
266+
.getKafkaTestUtils()
267+
.createTopic(topicName, 1, (short) 1);
268268

269269
// Create factory
270270
final KafkaConsumerFactory kafkaConsumerFactory = new KafkaConsumerFactory("not/used", "TestPrefix");

kafka-webview-ui/src/test/java/org/sourcelab/kafka/webview/ui/manager/kafka/KafkaOperationsTest.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ public void testGetAvailableTopics() {
6363

6464
// Create two topics
6565
sharedKafkaTestResource
66-
.getKafkaTestServer()
67-
.createTopic(topic1, 2);
66+
.getKafkaTestUtils()
67+
.createTopic(topic1, 2, (short) 1);
6868

6969
sharedKafkaTestResource
70-
.getKafkaTestServer()
71-
.createTopic(topic2, 1);
70+
.getKafkaTestUtils()
71+
.createTopic(topic2, 1, (short) 1);
7272

7373
final ClusterConfig clusterConfig = ClusterConfig.newBuilder()
7474
.withBrokerHosts(sharedKafkaTestResource.getKafkaConnectString())
@@ -140,12 +140,12 @@ public void testGetTopicDetails() {
140140

141141
// Create two topics
142142
sharedKafkaTestResource
143-
.getKafkaTestServer()
144-
.createTopic(topic1, 2);
143+
.getKafkaTestUtils()
144+
.createTopic(topic1, 2, (short) 1);
145145

146146
sharedKafkaTestResource
147-
.getKafkaTestServer()
148-
.createTopic(topic2, 1);
147+
.getKafkaTestUtils()
148+
.createTopic(topic2, 1, (short) 1);
149149

150150
final ClusterConfig clusterConfig = ClusterConfig.newBuilder()
151151
.withBrokerHosts(sharedKafkaTestResource.getKafkaConnectString())
@@ -196,12 +196,12 @@ public void testGetTopicConfig() {
196196

197197
// Create two topics
198198
sharedKafkaTestResource
199-
.getKafkaTestServer()
200-
.createTopic(topic1, 2);
199+
.getKafkaTestUtils()
200+
.createTopic(topic1, 2, (short) 1);
201201

202202
sharedKafkaTestResource
203-
.getKafkaTestServer()
204-
.createTopic(topic2, 1);
203+
.getKafkaTestUtils()
204+
.createTopic(topic2, 1, (short) 1);
205205

206206
final ClusterConfig clusterConfig = ClusterConfig.newBuilder()
207207
.withBrokerHosts(sharedKafkaTestResource.getKafkaConnectString())

kafka-webview-ui/src/test/java/org/sourcelab/kafka/webview/ui/manager/kafka/WebKafkaConsumerFactoryTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ public void beforeTest() {
6767

6868
// Create topics
6969
sharedKafkaTestResource
70-
.getKafkaTestServer()
71-
.createTopic(topic1, 2);
70+
.getKafkaTestUtils()
71+
.createTopic(topic1, 2, (short) 1);
7272

7373
sharedKafkaTestResource
74-
.getKafkaTestServer()
75-
.createTopic(topic2, 2);
74+
.getKafkaTestUtils()
75+
.createTopic(topic2, 2, (short) 1);
7676

7777
// Publish data into topics
7878
sharedKafkaTestResource

0 commit comments

Comments
 (0)