FrankChen021 commented on code in PR #19920:
URL: https://github.com/apache/druid/pull/19920#discussion_r3739919515


##########
indexing-service/src/test/java/org/apache/druid/indexing/common/task/AbstractTaskTest.java:
##########
@@ -56,15 +54,19 @@ public class AbstractTaskTest
 {
   private ObjectMapper objectMapper;
 
-  @Rule
-  public TemporaryFolder temporaryFolder = new TemporaryFolder();
-
-  @Before
+  @BeforeEach
   public void setup()
   {
     objectMapper = new TestUtils().getTestObjectMapper();
   }
 
+  private static File createTempReportFile() throws Exception
+  {
+    final File reportsFile = new 
File(org.apache.druid.java.util.common.FileUtils.createTempDir(), 
"report.json");
+    FileUtils.write(reportsFile, "", StandardCharsets.UTF_8);
+    return reportsFile;

Review Comment:
   Correction to the earlier reply: this thread is AbstractTaskTest. The local 
edit now uses a test-owned tempReportDir and deletes it in @AfterEach, so 
createTempReportFile no longer leaks its parent directory.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to