kumarpritam863 commented on code in PR #14630:
URL: https://github.com/apache/kafka/pull/14630#discussion_r1380518116


##########
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerSinkTaskTest.java:
##########
@@ -1999,6 +2004,81 @@ public void 
testErrorReporterConfigurationExceptionPropagation() {
         PowerMock.verifyAll();
     }
 
+    @Test
+    public void testPartitionCountInCaseOfPartitionRevocation() {
+        mockConsumer = new MockConsumer<>(OffsetResetStrategy.EARLIEST);
+        // Setting up Worker Sink Task to check metrics
+        workerTask = new WorkerSinkTask(
+                taskId, sinkTask, statusListener, TargetState.PAUSED, 
workerConfig, ClusterConfigState.EMPTY, metrics,
+                keyConverter, valueConverter, errorHandlingMetrics, 
headerConverter,
+                transformationChain, mockConsumer, pluginLoader, time,
+                RetryWithToleranceOperatorTest.NOOP_OPERATOR, null, 
statusBackingStore, Collections::emptyList);
+        // Subscribing to Topic = "test" with "MockHandleRebalance"
+        mockConsumer.subscribe(asList(TOPIC), new MockHandleRebalancePass());

Review Comment:
   Thanks @C0urante , Yes this would be nice and I have added this step and 
removed the Mock Handle Rebalances.



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

Reply via email to