suneet-s commented on code in PR #15311:
URL: https://github.com/apache/druid/pull/15311#discussion_r1381918388
##########
indexing-service/src/test/java/org/apache/druid/indexing/common/actions/UpdateStatusActionTest.java:
##########
@@ -78,12 +81,20 @@ public void testTaskStatusFull()
@Test
public void testNoTaskRunner()
{
- UpdateStatusAction action = new UpdateStatusAction("successful");
+ UpdateStatusAction action = new UpdateStatusAction("",
TaskStatus.success(ID));
Task task = NoopTask.create();
TaskActionToolbox toolbox = mock(TaskActionToolbox.class);
TaskRunner runner = mock(TaskRunner.class);
when(toolbox.getTaskRunner()).thenReturn(Optional.absent());
action.perform(task, toolbox);
verify(runner, never()).updateStatus(any(), any());
}
+
+ @Test
+ public void testEquals()
+ {
+ UpdateStatusAction one = new UpdateStatusAction("", TaskStatus.failure(ID,
"error"));
Review Comment:
`EqualsVerifier.forClass(UpdateStatusAction.class).verify()` will verify all
combinations of the underlying fields in the class and point out subtle issues
in the equals / hash code logic - see other tests like `testEquals` or
`testEqualsAndHashCode` for examples.
--
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]