dajac commented on code in PR #14687:
URL: https://github.com/apache/kafka/pull/14687#discussion_r1415122463


##########
streams/src/test/java/org/apache/kafka/streams/integration/utils/IntegrationTestUtils.java:
##########
@@ -239,10 +240,14 @@ 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) {
-        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);
+        // Generate a random uuid without an `-`. The `-` is used in Streams' 
thread name as
+        // a separator and some tests rely on this.
+        String randomUuid;
+        do {
+            randomUuid = Uuid.randomUuid().toString();
+        } while (randomUuid.contains("-"));

Review Comment:
   Yeah, I considered this as well. The question is which one should we use? We 
could use `_` but then the uuid looks a bit weird when you get one with `_` in 
the middle. I thought that it is ok to re-generate a new one in this case. I 
can change it if you prefer.



-- 
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-unsubscr...@kafka.apache.org

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

Reply via email to