FrankChen021 commented on code in PR #19622:
URL: https://github.com/apache/druid/pull/19622#discussion_r3466975683


##########
embedded-tests/src/test/java/org/apache/druid/testing/embedded/indexing/autoscaler/CostBasedAutoScalerIntegrationTest.java:
##########
@@ -180,6 +180,54 @@ public void 
test_autoScaler_computesOptimalTaskCountAndProducesScaleUp()
     
cluster.callApi().postSupervisor(kafkaSupervisorSpec.createSuspendedSpec());
   }
 
+  @Test
+  public void 
test_autoScaler_computesOptimalTaskCountAndProducesScaleUp_withUtilizationRatio()
+  {
+
+    final int lowInitialTaskCount = 1;
+    // This ensures tasks are busy processing (low idle ratio)
+    Executors.newSingleThreadExecutor().submit(() -> {

Review Comment:
   [P2] Shut down the background publisher executor
   
   The new test creates a single-thread ExecutorService and immediately drops 
it. That executor uses a non-daemon worker and is never shut down, so the 
embedded-test JVM can stay alive after the test returns; on timeout or failure 
it can also keep publishing into the topic while cleanup is running. Keep a 
reference and shut it down/cancel the Future in a finally block or use an 
existing managed executor.



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