mchades commented on code in PR #12585:
URL: https://github.com/apache/gravitino/pull/12585#discussion_r4346303889
##########
core/src/main/java/org/apache/gravitino/listener/CatalogEventDispatcher.java:
##########
@@ -260,4 +267,26 @@ public void disableCatalog(NameIdentifier ident) throws
NoSuchCatalogException {
throw e;
}
}
+
+ private void dispatchTestConnection(
+ NameIdentifier ident,
+ @Nullable CatalogInfo catalogInfo,
+ @Nullable CatalogChange[] changes,
+ ConnectionTestAction action)
+ throws Exception {
+ String user = PrincipalUtils.getCurrentUserName();
+ eventBus.dispatchEvent(new TestConnectionPreEvent(user, ident,
catalogInfo, changes));
Review Comment:
Mapped `ForbiddenException` to HTTP 403 in the shared handler. Added REST
tests for both endpoints, covering stored configuration, proposed changes, and
empty changes. They verify that a synchronous pre-listener veto never reaches
the delegate and preserves the existing stack-trace behavior.
--
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]