dennismdejong commented on code in PR #13668:
URL: https://github.com/apache/gravitino/pull/13668#discussion_r4215861400


##########
core/src/test/java/org/apache/gravitino/listener/TestTableEventDispatcher.java:
##########
@@ -127,6 +130,60 @@ void 
testExtrasDoNotLeakIntoTheNextOperationOnTheSameThread() {
         second.customInfo().isEmpty(), "Extras must not survive into a later 
operation");
   }
 
+  /**
+   * A failure-event listener must not be able to mask the original 
create-table failure: when the
+   * dispatcher throws, the {@link CreateTableFailureEvent} listener exception 
is swallowed by the
+   * {@link EventBus} so callers still see the original exception.
+   */
+  @Test
+  void 
testCreateTableFailureEventShouldNotMaskOriginalExceptionWhenListenerThrows() {

Review Comment:
   Correct. The production behavior is already fixed by #10665 (commit 
85a8de09a), which added `EventBus.dispatchFailureEvent` to swallow listener 
exceptions for all `FailureEvent` subclasses. #10597 reports the same symptom 
on the create-table path.
   
   This PR is test-only on purpose: it is the regression test pinned to the 
exact call site from #10597. The existing 
`TestEventBus.testDispatchEventSwallowsExceptionsForFailureEvents` covers 
`EventBus` in isolation with a synthetic `FailureEvent`; this one drives 
`TableEventDispatcher.createTable` end to end (dispatcher throws -> 
`CreateTableFailureEvent` dispatched -> listener throws -> original exception 
rethrown unchanged) and asserts it is the same instance. No production change 
is needed.



-- 
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]

Reply via email to