Savonitar commented on code in PR #28857:
URL: https://github.com/apache/flink/pull/28857#discussion_r3719446905


##########
flink-core/src/test/java/org/apache/flink/util/MdcUtilsTest.java:
##########
@@ -131,6 +133,54 @@ void testJobIdLoggedByWrappingMechanism(
         assertJobIDLogged(scenario, jobID -> action.accept(jobID));
     }
 
+    @Test
+    void testJobThreadNameSuffix() {
+        JobID jobID = new JobID();
+        assertThat(MdcUtils.jobThreadNameSuffix(new JobInfoImpl(jobID, 
"my-job")))
+                .isEqualTo(" (job: my-job / " + jobID.toHexString() + ")");
+    }
+
+    @Test
+    void testJobThreadNameSuffixKeepsJobNameAtMaxLength() {
+        JobID jobID = new JobID();
+        String jobNameAtCap = "n".repeat(MdcUtils.MAX_JOB_NAME_IN_THREAD_NAME);

Review Comment:
   The at-cap case was already covered, but I replaced tests with Parametrised 
test to fold similar 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to