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
3042
3042
// Sender will try to send and fail with TransactionAbortableException instead of COORDINATOR_LOAD_IN_PROGRESS, because we're in abortable state
3043
3043
sender .runOnce ();
3044
3044
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
+
3045
3055
}
3046
3056
3047
3057
@ Test
You can’t perform that action at this time.
0 commit comments