kfaraz commented on code in PR #18876:
URL: https://github.com/apache/druid/pull/18876#discussion_r2653480281


##########
processing/src/test/java/org/apache/druid/java/util/metrics/StubServiceEmitter.java:
##########
@@ -41,18 +44,32 @@
  */
 public class StubServiceEmitter extends ServiceEmitter implements 
MetricsVerifier
 {
+  public static final String TYPE = "stub";
+
   private final Deque<Event> events = new ConcurrentLinkedDeque<>();
   private final Deque<AlertEvent> alertEvents = new ConcurrentLinkedDeque<>();
   private final ConcurrentHashMap<String, Deque<ServiceMetricEvent>> 
metricEvents = new ConcurrentHashMap<>();
 
   public StubServiceEmitter()
   {
-    super("testing", "localhost", null);
+    this("testing", "localhost");
   }
 
+  /**
+   * Initialize a stub service emitter and auto-{@link #start()}  it for test 
convenience.
+   */
   public StubServiceEmitter(String service, String host)
   {
-    super(service, host, null);
+    this(service, host, new NoopTaskHolder());
+    super.start();
+  }
+
+  /**
+   * Initialize a stub service emitter. Tests must explicitly call {@link 
#start()}.
+   */
+  public StubServiceEmitter(String service, String host, TaskHolder taskHolder)

Review Comment:
   Yeah, that's fair, let me create a PR to add the steps for running these 
tests.
   Meanwhile, we can merge this PR and you can add the tests in a follow up.
   
   > since it requires some additional setup like installing dependencies like 
k3s, etc.
   
   I might need to check but AFAIR, the tests just need docker to be running. 
There are some steps required though, like setting the Druid image name etc.



-- 
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]

Reply via email to