You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "brandboat (via GitHub)" <gi...@apache.org> on 2024/10/24 15:58:58 UTC

[PR] KAFKA-17857 Move AbstractResetIntegrationTest and subclasses to tools [kafka]

brandboat opened a new pull request, #17594:
URL: https://github.com/apache/kafka/pull/17594

   related to https://issues.apache.org/jira/browse/KAFKA-17867,
   
   as title, move AbstractResetIntegrationTest and subclasses to tools module
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17857 Move AbstractResetIntegrationTest and subclasses to tools [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #17594:
URL: https://github.com/apache/kafka/pull/17594


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17857 Move AbstractResetIntegrationTest and subclasses to tools [kafka]

Posted by "brandboat (via GitHub)" <gi...@apache.org>.
brandboat commented on code in PR #17594:
URL: https://github.com/apache/kafka/pull/17594#discussion_r1815371458


##########
tools/src/test/java/org/apache/kafka/tools/AbstractResetIntegrationTest.java:
##########
@@ -306,17 +304,17 @@ private void testReprocessingFromScratchAfterResetWithIntermediateUserTopic(fina
         final List<KeyValue<Long, Long>> resultRerun2 = IntegrationTestUtils.waitUntilMinKeyValueRecordsReceived(resultConsumerConfig, OUTPUT_TOPIC_2_RERUN, 40);
         streams.close();
 
-        assertThat(resultRerun, equalTo(result));
-        assertThat(resultRerun2, equalTo(result2));
+        assertEquals(result, resultRerun);
+        assertEquals(result2, resultRerun2);
 
         if (!useRepartitioned) {
             final Properties props = TestUtils.consumerConfig(cluster.bootstrapServers(), appID + "-result-consumer", LongDeserializer.class, StringDeserializer.class, commonClientConfig);
             final List<KeyValue<Long, String>> resultIntermediate = IntegrationTestUtils.waitUntilMinKeyValueRecordsReceived(props, INTERMEDIATE_USER_TOPIC, 21);
 
             for (int i = 0; i < 10; i++) {
-                assertThat(resultIntermediate.get(i), equalTo(resultIntermediate.get(i + 11)));
+                assertEquals(resultIntermediate.get(i), resultIntermediate.get(i + 11));

Review Comment:
   Thanks, I missed those two assertions.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17857 Move AbstractResetIntegrationTest and subclasses to tools [kafka]

Posted by "m1a2st (via GitHub)" <gi...@apache.org>.
m1a2st commented on code in PR #17594:
URL: https://github.com/apache/kafka/pull/17594#discussion_r1815359264


##########
tools/src/test/java/org/apache/kafka/tools/AbstractResetIntegrationTest.java:
##########
@@ -246,7 +244,7 @@ public void testReprocessingFromScratchAfterResetWithoutIntermediateUserTopic(fi
         final List<KeyValue<Long, Long>> resultRerun = IntegrationTestUtils.waitUntilMinKeyValueRecordsReceived(resultConsumerConfig, OUTPUT_TOPIC, 10);
         streams.close();
 
-        assertThat(resultRerun, equalTo(result));
+        assertEquals(resultRerun, result);

Review Comment:
   This `assertEquals` statement has the expected and actual values in the wrong order.



##########
tools/src/test/java/org/apache/kafka/tools/AbstractResetIntegrationTest.java:
##########
@@ -306,17 +304,17 @@ private void testReprocessingFromScratchAfterResetWithIntermediateUserTopic(fina
         final List<KeyValue<Long, Long>> resultRerun2 = IntegrationTestUtils.waitUntilMinKeyValueRecordsReceived(resultConsumerConfig, OUTPUT_TOPIC_2_RERUN, 40);
         streams.close();
 
-        assertThat(resultRerun, equalTo(result));
-        assertThat(resultRerun2, equalTo(result2));
+        assertEquals(result, resultRerun);
+        assertEquals(result2, resultRerun2);
 
         if (!useRepartitioned) {
             final Properties props = TestUtils.consumerConfig(cluster.bootstrapServers(), appID + "-result-consumer", LongDeserializer.class, StringDeserializer.class, commonClientConfig);
             final List<KeyValue<Long, String>> resultIntermediate = IntegrationTestUtils.waitUntilMinKeyValueRecordsReceived(props, INTERMEDIATE_USER_TOPIC, 21);
 
             for (int i = 0; i < 10; i++) {
-                assertThat(resultIntermediate.get(i), equalTo(resultIntermediate.get(i + 11)));
+                assertEquals(resultIntermediate.get(i), resultIntermediate.get(i + 11));

Review Comment:
   ditto This `assertEquals` statement has the expected and actual values in the wrong order.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17857 Move AbstractResetIntegrationTest and subclasses to tools [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #17594:
URL: https://github.com/apache/kafka/pull/17594#issuecomment-2436107378

   I have left some comment in jira.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17857 Move AbstractResetIntegrationTest and subclasses to tools [kafka]

Posted by "brandboat (via GitHub)" <gi...@apache.org>.
brandboat commented on code in PR #17594:
URL: https://github.com/apache/kafka/pull/17594#discussion_r1815303550


##########
build.gradle:
##########
@@ -2500,6 +2502,7 @@ project(':tools') {
     testImplementation libs.apachedsLdifPartition
 
     testRuntimeOnly libs.junitPlatformLanucher
+    testRuntimeOnly libs.hamcrest

Review Comment:
   One wrinkle here is that org.apache.kafka.streams.integration.utils.IntegrationTestUtils relies on Hamcrest, so I add it to the tools module.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17857 Move AbstractResetIntegrationTest and subclasses to tools [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #17594:
URL: https://github.com/apache/kafka/pull/17594#issuecomment-2451648989

   @brandboat could you please rebase code?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org