FrankChen021 commented on code in PR #19915:
URL: https://github.com/apache/druid/pull/19915#discussion_r3736467469
##########
extensions-contrib/aliyun-oss-extensions/src/test/java/org/apache/druid/storage/aliyun/OssDataSegmentPusherTest.java:
##########
@@ -91,7 +90,7 @@ private void testPushInternal(boolean useUniquePath, String
matcher) throws Exce
OssDataSegmentPusher pusher = new OssDataSegmentPusher(client, config);
// Create a mock segment on disk
- File tmp = tempFolder.newFile("version.bin");
+ File tmp = new File(tempFolder, "version.bin");
Review Comment:
Classified as pre-existing/context-only. Base commit `fe4377a4` already
declared `File tmp` without `final`; this PR only changes the temporary-file
creation from `tempFolder.newFile(...)` to `new File(...)` for the JUnit 5
`@TempDir` migration. No new defect is introduced, so the declaration is
unchanged.
##########
extensions-contrib/aliyun-oss-extensions/src/test/java/org/apache/druid/storage/aliyun/OssTaskLogsTest.java:
##########
@@ -424,7 +423,8 @@ private List<Grant> testPushInternal(boolean disableAcl,
String ownerId, String
OssTaskLogs taskLogs = new OssTaskLogs(ossClient, config, inputDataConfig,
timeSupplier);
String taskId = "index_test-datasource_2019-06-18T13:30:28.887Z";
- File logFile = tempFolder.newFile("test_log_file");
+ File logFile = new File(tempFolder, "test_log_file");
+ Assertions.assertTrue(logFile.createNewFile());
Review Comment:
Classified as pre-existing/context-only. In base commit `fe4377a4`, both
declarations were already non-final (`String taskId` and `File logFile`). This
PR only changes `logFile` construction from `TemporaryFolder.newFile(...)` to
`new File(...)` for the JUnit 5 `@TempDir` migration, so it introduces no
defect related to these declarations.
--
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]