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