Fix random unit test failure from NoopTask ID collision

This commit is contained in:
Charles Allen 2015-04-24 13:07:48 -07:00
parent 7081c830e4
commit 29341f9837
1 changed files with 3 additions and 1 deletions

View File

@ -28,6 +28,8 @@ import io.druid.indexing.common.TaskToolbox;
import io.druid.indexing.common.actions.TaskActionClient; import io.druid.indexing.common.actions.TaskActionClient;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import java.util.UUID;
/** /**
*/ */
public class NoopTask extends AbstractTask public class NoopTask extends AbstractTask
@ -66,7 +68,7 @@ public class NoopTask extends AbstractTask
) )
{ {
super( super(
id == null ? String.format("noop_%s", new DateTime()) : id, id == null ? String.format("noop_%s_%s", new DateTime(), UUID.randomUUID().toString()) : id,
"none" "none"
); );