kfaraz commented on code in PR #14631:
URL: https://github.com/apache/druid/pull/14631#discussion_r1283943884


##########
server/src/test/java/org/apache/druid/server/coordinator/duty/KillAuditLogTest.java:
##########
@@ -93,9 +94,16 @@ public void testConstructorFailIfInvalidPeriod()
         .withCoordinatorKillMaxSegments(10)
         .withCoordinatorKillIgnoreDurationToRetain(false)
         .build();
-    exception.expect(IllegalArgumentException.class);
-    exception.expectMessage("coordinator audit kill period must be >= 
druid.coordinator.period.metadataStoreManagementPeriod");
-    killAuditLog = new KillAuditLog(mockAuditManager, druidCoordinatorConfig);
+
+    final IllegalArgumentException exception = Assert.assertThrows(
+        IllegalArgumentException.class,
+        () -> killAuditLog = new KillAuditLog(mockAuditManager, 
druidCoordinatorConfig)

Review Comment:
   Yeah, I would prefer it to be so, but it shows up as an inspection warning 
if you don't assign the return value to some variable.



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