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


##########
embedded-tests/src/test/java/org/apache/druid/testing/embedded/indexing/KafkaClusterMetricsTest.java:
##########
@@ -175,6 +181,74 @@ public void 
test_ingest10kRows_ofSelfClusterMetrics_andVerifyValues()
     
cluster.callApi().postSupervisor(kafkaSupervisorSpec.createSuspendedSpec());
   }
 
+  @Test
+  @Timeout(60)
+  public void 
test_ingest20kRows_ofSelfClusterMetricsWithScaleOuts_andVerifyValues()

Review Comment:
   Some typical test cases can be something like:
   (all of these cases should be added to a new class `KafkaTaskScalingTest`)
   
   Case 1:
   - No auto-scaling
   - Task duration = 0.5s, perpetual = false
   - Start the supervisor
   - Do not publish any data to Kafka topic
   - Verify that tasks finish within 1s (+ completion time might take the total 
duration to 2 or 3s but definitely < 5s)
   - Stop the supervisor
   
   Case 2:
   - No auto-scaling
   - Task duration = 0.5s, perpetual = true
   - Start the supervisor
   - Do not publish any data to Kafka topic
   - Verify that tasks do not finish even after 10s
   - Stop the supervisor
   
   Case 3:
   - Auto-scaling enabled
   - Task duration = 0.5s, perpetual = true
   - Start the supervisor
   - Do not publish any data to Kafka topic
   - Verify that tasks are scaled down after some time
   - Stop the supervisor
   
   Case 4:
   - Auto-scaling enabled
   - Task duration = 0.5s, perpetual = true
   - Start the supervisor
   - Publish some data and force the task to enter into some lag that triggers 
scale up action
   (you may use `druid.unsafe.cluster.testing` for this, see 
`ClusterTestingModule`)
   - Verify that tasks are scaled up after some time.
   - Verify all kinds of events here - that the tasks were paused and 
checkpointed, then they waited for config update, and then they were finally 
resumed
   - Don't send any more data
   - Verify that the tasks are scaled down
   - Verify the events again
   - Stop the supervisor



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