vvcephei commented on a change in pull request #8541:
URL: https://github.com/apache/kafka/pull/8541#discussion_r414653962



##########
File path: build.gradle
##########
@@ -236,8 +236,10 @@ subprojects {
     def logStreams = new HashMap<String, FileOutputStream>()
     beforeTest { TestDescriptor td ->
       def tid = testId(td)
+      // truncate the file name if it's too long
       def logFile = new File(
-          "${projectDir}/build/reports/testOutput/${tid}.test.stdout")
+              "${projectDir}/build/reports/testOutput/${tid.substring(0, 
Math.min(tid.size(),240))}.test.stdout"

Review comment:
       The only alternative I can think of is to parameterize the "short name" 
of the TaskAssignor, which seems kind of wacky.
   
   Also, worth noting the impact of truncation is nothing if the file name is 
still unique. If the name is shared between two tests, then the impact is still 
nothing if both tests pass. The only observable effect is that if one or both 
tests fail, their logs would get combined. It seems like we can afford just to 
defer this problem until it happens, if ever.




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

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


Reply via email to