You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/09/16 07:26:19 UTC

[GitHub] [kafka] cadonna opened a new pull request, #12650: KAFKA-10199: Adapt restoration integration tests to state updater

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

   Transforms the integration test that verifies restoration in a parametrized test. The parametrized test runs once with state updater enabled and once with state updater disabled.
   
   ### 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


[GitHub] [kafka] cadonna commented on pull request #12650: KAFKA-10199: Adapt restoration integration tests to state updater

Posted by GitBox <gi...@apache.org>.
cadonna commented on PR #12650:
URL: https://github.com/apache/kafka/pull/12650#issuecomment-1251322148

   Build failures are unrelated:
   ```
   Build / JDK 11 and Scala 2.13 / org.apache.kafka.connect.runtime.rest.RestServerTest.testDisableAdminEndpoint
   ```


-- 
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


[GitHub] [kafka] guozhangwang commented on a diff in pull request #12650: KAFKA-10199: Adapt restoration integration tests to state updater

Posted by GitBox <gi...@apache.org>.
guozhangwang commented on code in PR #12650:
URL: https://github.com/apache/kafka/pull/12650#discussion_r974499005


##########
streams/src/test/java/org/apache/kafka/streams/integration/RestoreIntegrationTest.java:
##########
@@ -291,8 +297,9 @@ public void shouldSuccessfullyStartWhenLoggingDisabled() throws InterruptedExcep
         assertTrue(startupLatch.await(30, TimeUnit.SECONDS));
     }
 
-    @Test
-    public void shouldProcessDataFromStoresWithLoggingDisabled() throws InterruptedException {
+    @ParameterizedTest

Review Comment:
   Ack, thanks.



-- 
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


[GitHub] [kafka] guozhangwang commented on a diff in pull request #12650: KAFKA-10199: Adapt restoration integration tests to state updater

Posted by GitBox <gi...@apache.org>.
guozhangwang commented on code in PR #12650:
URL: https://github.com/apache/kafka/pull/12650#discussion_r973179800


##########
streams/src/test/java/org/apache/kafka/streams/integration/RestoreIntegrationTest.java:
##########
@@ -291,8 +297,9 @@ public void shouldSuccessfullyStartWhenLoggingDisabled() throws InterruptedExcep
         assertTrue(startupLatch.await(30, TimeUnit.SECONDS));
     }
 
-    @Test
-    public void shouldProcessDataFromStoresWithLoggingDisabled() throws InterruptedException {
+    @ParameterizedTest

Review Comment:
   Could we just parameterize the whole class than parameterizing each test method?



##########
streams/src/test/java/org/apache/kafka/streams/integration/utils/IntegrationTestUtils.java:
##########
@@ -239,11 +239,15 @@ public static String safeUniqueTestName(final Class<?> testClass, final TestName
      * Used by tests migrated to JUnit 5.
      */
     public static String safeUniqueTestName(final Class<?> testClass, final TestInfo testInfo) {
-        return safeUniqueTestName(testClass, testInfo.getTestMethod().map(Method::getName).orElse(""));
+        final String displayName = testInfo.getDisplayName();
+        final String methodName = testInfo.getTestMethod().map(Method::getName).orElse("unknownMethodName");
+        final String testName = displayName.contains(methodName) ? methodName : methodName + displayName;
+        return safeUniqueTestName(testClass, testName);
+//        return safeUniqueTestName(testClass, testInfo.getDisplayName());

Review Comment:
   Remove?



-- 
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


[GitHub] [kafka] cadonna merged pull request #12650: KAFKA-10199: Adapt restoration integration tests to state updater

Posted by GitBox <gi...@apache.org>.
cadonna merged PR #12650:
URL: https://github.com/apache/kafka/pull/12650


-- 
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


[GitHub] [kafka] cadonna commented on pull request #12650: KAFKA-10199: Adapt restoration integration tests to state updater

Posted by GitBox <gi...@apache.org>.
cadonna commented on PR #12650:
URL: https://github.com/apache/kafka/pull/12650#issuecomment-1249016434

   Call for review: @wcarlson5 @lihaosky 


-- 
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


[GitHub] [kafka] cadonna commented on a diff in pull request #12650: KAFKA-10199: Adapt restoration integration tests to state updater

Posted by GitBox <gi...@apache.org>.
cadonna commented on code in PR #12650:
URL: https://github.com/apache/kafka/pull/12650#discussion_r974112162


##########
streams/src/test/java/org/apache/kafka/streams/integration/RestoreIntegrationTest.java:
##########
@@ -291,8 +297,9 @@ public void shouldSuccessfullyStartWhenLoggingDisabled() throws InterruptedExcep
         assertTrue(startupLatch.await(30, TimeUnit.SECONDS));
     }
 
-    @Test
-    public void shouldProcessDataFromStoresWithLoggingDisabled() throws InterruptedException {
+    @ParameterizedTest

Review Comment:
   In Junit 5 it is apparently not possible to parametrize on test class level. However, you can use a method as the source for the parameter values `true` and `false` for all test methods instead of enumerating `true` and `false` for each test method. I used the method source.



-- 
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