File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
clients/src/test/java/org/apache/kafka/clients/producer/internals Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -3042,6 +3042,16 @@ public void testSenderShouldTransitionToAbortableAfterRetriesExhausted() throws
30423042 // Sender will try to send and fail with TransactionAbortableException instead of COORDINATOR_LOAD_IN_PROGRESS, because we're in abortable state
30433043 sender .runOnce ();
30443044 assertFutureFailure (future2 , TransactionAbortableException .class );
3045+
3046+
3047+ // Verify transaction API requests also fail with TransactionAbortableException
3048+ try {
3049+ txnManager .beginCommit ();
3050+ fail ("Expected beginCommit() to fail with TransactionAbortableException when in abortable error state" );
3051+ } catch (KafkaException e ) {
3052+ assertEquals (TransactionAbortableException .class , e .getCause ().getClass ());
3053+ }
3054+
30453055 }
30463056
30473057 @ Test
You can’t perform that action at this time.
0 commit comments