mirror of https://github.com/apache/kafka.git
				
				
				
			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 <jason@confluent.io>
This commit is contained in:
		
							parent
							
								
									1d84f54367
								
							
						
					
					
						commit
						aebb0e3394
					
				|  | @ -652,7 +652,6 @@ class TransactionsTest extends KafkaServerTestHarness { | ||||||
| 
 | 
 | ||||||
|       producer.beginTransaction() |       producer.beginTransaction() | ||||||
|       producer.send(TestUtils.producerRecordWithExpectedTransactionStatus(topic1, null, "2", "2", willBeCommitted = false)) |       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 |       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)) |       val failedFuture = producer.send(TestUtils.producerRecordWithExpectedTransactionStatus(testTopic, 0, "3", "3", willBeCommitted = false)) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue