You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "cadonna (via GitHub)" <gi...@apache.org> on 2023/12/01 12:19:15 UTC
Re: [PR] MINOR: Add junit properties to display parameterized test names [kafka]
cadonna commented on code in PR #14687:
URL: https://github.com/apache/kafka/pull/14687#discussion_r1412039372
##########
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:
Why not just replacing `-` with a different character?
--
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