From 29341f98378b16ec1a5d6da6e2bd98cc6432d58b Mon Sep 17 00:00:00 2001 From: Charles Allen Date: Fri, 24 Apr 2015 13:07:48 -0700 Subject: [PATCH] Fix random unit test failure from NoopTask ID collision --- .../src/main/java/io/druid/indexing/common/task/NoopTask.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indexing-service/src/main/java/io/druid/indexing/common/task/NoopTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/NoopTask.java index e6a32c7ae5e..3b0debf2c13 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/task/NoopTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/NoopTask.java @@ -28,6 +28,8 @@ import io.druid.indexing.common.TaskToolbox; import io.druid.indexing.common.actions.TaskActionClient; import org.joda.time.DateTime; +import java.util.UUID; + /** */ public class NoopTask extends AbstractTask @@ -66,7 +68,7 @@ public class NoopTask extends AbstractTask ) { super( - id == null ? String.format("noop_%s", new DateTime()) : id, + id == null ? String.format("noop_%s_%s", new DateTime(), UUID.randomUUID().toString()) : id, "none" );