From aebb0e33943bd8d410de1aa8160a01d9581c8681 Mon Sep 17 00:00:00 2001 From: Chia-Ping Tsai Date: Wed, 9 Dec 2020 01:13:32 +0800 Subject: [PATCH] KAFKA-10264; Fix Flaky Test TransactionsTest.testBumpTransactionalEpoch (#9291) The test case sends two records before killing broker. The failure is caused when both records are NOT sent in a single batch. The failure of first record can abort second batch and then produces `KafkaException` rather than `TimeoutException`. The patch removes the second record send. Reviewers: Jason Gustafson --- core/src/test/scala/integration/kafka/api/TransactionsTest.scala | 1 - 1 file changed, 1 deletion(-) diff --git a/core/src/test/scala/integration/kafka/api/TransactionsTest.scala b/core/src/test/scala/integration/kafka/api/TransactionsTest.scala index 1d3f96831cf..073cbcf15f8 100644 --- a/core/src/test/scala/integration/kafka/api/TransactionsTest.scala +++ b/core/src/test/scala/integration/kafka/api/TransactionsTest.scala @@ -652,7 +652,6 @@ class TransactionsTest extends KafkaServerTestHarness { producer.beginTransaction() producer.send(TestUtils.producerRecordWithExpectedTransactionStatus(topic1, null, "2", "2", willBeCommitted = false)) - producer.send(TestUtils.producerRecordWithExpectedTransactionStatus(testTopic, 0, "4", "4", willBeCommitted = false)) killBroker(partitionLeader) // kill the partition leader to prevent the batch from being submitted val failedFuture = producer.send(TestUtils.producerRecordWithExpectedTransactionStatus(testTopic, 0, "3", "3", willBeCommitted = false))