mirror of https://github.com/apache/druid.git
TaskLifecycleTest: Add test for never-ready task
This commit is contained in:
parent
863012c384
commit
3b053a66ff
|
@ -293,6 +293,20 @@ public class TaskLifecycleTest
|
|||
Assert.assertEquals("num segments nuked", 0, mdc.getNuked().size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNeverReadyTask() throws Exception
|
||||
{
|
||||
final Task neverReadyTask = new DefaultObjectMapper().readValue(
|
||||
"{\"type\":\"noop\", \"isReadyResult\":\"exception\"}\"",
|
||||
Task.class
|
||||
);
|
||||
final TaskStatus status = runTask(neverReadyTask);
|
||||
|
||||
Assert.assertEquals("statusCode", TaskStatus.Status.FAILED, status.getStatusCode());
|
||||
Assert.assertEquals("num segments published", 0, mdc.getPublished().size());
|
||||
Assert.assertEquals("num segments nuked", 0, mdc.getNuked().size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSimple() throws Exception
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue