laskoviymishka commented on code in PR #16432:
URL: https://github.com/apache/iceberg/pull/16432#discussion_r3287685947


##########
kafka-connect/kafka-connect/src/test/java/org/apache/iceberg/connect/channel/TestCommitterImpl.java:
##########
@@ -114,4 +119,27 @@ public void testHasLeaderPartition() throws 
NoSuchFieldException, IllegalAccessE
       assertThat(committer.hasLeaderPartition(nonLeaderAssignments)).isFalse();
     }
   }
+
+  @Test
+  public void testCommitFailurePropagatesAsNotRunningException()
+      throws NoSuchFieldException, IllegalAccessException {
+    Coordinator coordinator = mock(Coordinator.class);
+    doThrow(new RuntimeException("commit failed")).when(coordinator).process();

Review Comment:
   `CoordinatorThread.run()` has a symmetric catch on `coordinator.start()` 
(lines 40–43) that also sets `terminated = true`. This test covers the 
`process()` branch, but a regression in the `start()` path would slip through 
unnoticed.
   
   I'd add a sibling test that stubs `doThrow(...).when(coordinator).start()` — 
same assertion shape, just the other branch. wdyt?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to