Copilot commented on code in PR #19915:
URL: https://github.com/apache/druid/pull/19915#discussion_r3736351798
##########
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:
Repository style requires using `final` for variables that are not
reassigned (AGENTS.md:40). `taskId` and `logFile` are not reassigned and can be
`final`.
##########
extensions-contrib/aliyun-oss-extensions/src/test/java/org/apache/druid/storage/aliyun/OssTimestampVersionedDataFinderTest.java:
##########
@@ -102,7 +102,7 @@ public void testMissing()
EasyMock.verify(oss);
- Assert.assertEquals(null, latest);
+ Assertions.assertEquals(null, latest);
Review Comment:
Prefer `Assertions.assertNull(latest)` over `assertEquals(null, latest)` for
clearer intent and better failure messages when this assertion fails.
##########
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:
Repository style requires using `final` for variables that are not
reassigned (AGENTS.md:40). `tmp` is not reassigned and can be `final`.
--
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]