github-advanced-security[bot] commented on code in PR #17976:
URL: https://github.com/apache/druid/pull/17976#discussion_r2072410689
##########
server/src/test/java/org/apache/druid/server/log/FileRequestLoggerTest.java:
##########
@@ -119,15 +121,63 @@
public void testLogRemoveWithInvalidDuration() throws Exception
{
expectedException.expect(IllegalArgumentException.class);
- expectedException.expectMessage("request logs retention period must be
atleast P1D");
+ expectedException.expectMessage("request logs retention period must be
atleast as long as roll period");
ObjectMapper objectMapper = new ObjectMapper();
File logDir = temporaryFolder.newFolder();
FileRequestLogger fileRequestLogger = new FileRequestLogger(
objectMapper,
scheduler,
logDir,
"yyyy-MM-dd'.log'",
- Duration.standardHours(12)
+ Duration.standardMinutes(30),
+ Duration.standardDays(1)
+ );
+ }
+
+ @Test
+ public void testRollPeriodForLog() throws Exception
+ {
+ ObjectMapper objectMapper = new ObjectMapper();
+ DateTime dateTime = DateTimes.nowUtc();
+ File logDir = temporaryFolder.newFolder();
+ String nativeQueryLogString = dateTime + "\t" + HOST + "\t" + "native";
Review Comment:
## Unread local variable
Variable 'String nativeQueryLogString' is never read.
[Show more
details](https://github.com/apache/druid/security/code-scanning/9160)
--
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]