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


##########
services/src/test/java/org/apache/druid/testing/embedded/EmbeddedBroker.java:
##########
@@ -54,6 +79,9 @@ private Broker(LifecycleInitHandler handler)
     @Override
     public Lifecycle initLifecycle(Injector injector)
     {
+      final BrokerServerView serverView = 
injector.getInstance(BrokerServerView.class);

Review Comment:
   I had initially done something similar (i.e. registering a listener) for 
tracking completion of tasks too.
   But eventually decided against it as it seemed much cleaner to just wait for 
the appropriate metric (`task/run/time` in that case).
   Waiting for an actual metric event seemed like the best way to wait for an 
event to happen in the cluster.
   
   I wonder if we shouldn't do something similar here.
   We could emit a count metric from Broker for all the datasource + version 
that it is currently aware of.
   While improving the test, it also improves visibility into the actual 
product.
   
   I also feel that adding listeners in the embedded servers will gradually 
bloat this class up as we try to add more test cases.
   
   Let me know what you think.



-- 
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: commits-unsubscr...@druid.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to