bharos commented on code in PR #10488:
URL: https://github.com/apache/gravitino/pull/10488#discussion_r2983195444
##########
core/src/test/java/org/apache/gravitino/listener/api/event/TestCatalogEvent.java:
##########
@@ -254,6 +288,36 @@ void testDropCatalogFailureEvent() {
Assertions.assertEquals(OperationStatus.FAILURE, event.operationStatus());
}
+ @Test
+ void testEnableCatalogFailureEvent() {
+ NameIdentifier identifier = NameIdentifier.of("metalake", catalog.name());
+ Assertions.assertThrowsExactly(
+ GravitinoRuntimeException.class, () ->
failureDispatcher.enableCatalog(identifier));
+ Event event = dummyEventListener.popPostEvent();
+ Assertions.assertEquals(identifier, event.identifier());
+ Assertions.assertEquals(EnableCatalogFailureEvent.class, event.getClass());
+ Assertions.assertEquals(
+ GravitinoRuntimeException.class,
+ ((EnableCatalogFailureEvent) event).exception().getClass());
+ Assertions.assertEquals(OperationType.ENABLE_CATALOG,
event.operationType());
+ Assertions.assertEquals(OperationStatus.FAILURE, event.operationStatus());
+ }
Review Comment:
Is this actually a problem ? If so we need to address this.
Otherwise the PR LGTM
--
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]