Use higher poll timeout to avoid rebalance in testCoordinatorFailover
Reviewers: Manikumar Reddy
@@ -52,7 +52,9 @@ abstract class BaseConsumerTest extends AbstractConsumerTest {
def testCoordinatorFailover(): Unit = {
val listener = new TestConsumerReassignmentListener()
this.consumerConfig.setProperty(ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG, "5001")
- this.consumerConfig.setProperty(ConsumerConfig.HEARTBEAT_INTERVAL_MS_CONFIG, "2000")
+ this.consumerConfig.setProperty(ConsumerConfig.HEARTBEAT_INTERVAL_MS_CONFIG, "1000")
+ // Use higher poll timeout to avoid consumer leaving the group due to timeout
+ this.consumerConfig.setProperty(ConsumerConfig.MAX_POLL_INTERVAL_MS_CONFIG, "15000")
val consumer = createConsumer()
consumer.subscribe(List(topic).asJava, listener)
