This is an automated email from the ASF dual-hosted git repository.

fanng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/main by this push:
     new 15f5e33be4 [#7466] add testListMetadataObjectsForTagFailureEvent to 
TestTagEvent (#7496)
15f5e33be4 is described below

commit 15f5e33be41ecb4b8babb2f61650939c57d2c0c5
Author: Yunchi Pang <[email protected]>
AuthorDate: Mon Jun 30 04:29:03 2025 -0700

    [#7466] add testListMetadataObjectsForTagFailureEvent to TestTagEvent 
(#7496)
    
    ### What changes were proposed in this pull request?
    
    Add `testListMetadataObjectsForTagFailureEvent` to `TestTagEvent`.
    
    ### Why are the changes needed?
    
    Missing failure event test for `listMetadataObjectsForTag`.
    Fix: #7466
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Unit test added.
---
 .../apache/gravitino/listener/api/event/TestTagEvent.java  | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git 
a/core/src/test/java/org/apache/gravitino/listener/api/event/TestTagEvent.java 
b/core/src/test/java/org/apache/gravitino/listener/api/event/TestTagEvent.java
index 2f276ba45f..a53942751a 100644
--- 
a/core/src/test/java/org/apache/gravitino/listener/api/event/TestTagEvent.java
+++ 
b/core/src/test/java/org/apache/gravitino/listener/api/event/TestTagEvent.java
@@ -468,6 +468,20 @@ public class TestTagEvent {
     Assertions.assertEquals(OperationStatus.FAILURE, event.operationStatus());
   }
 
+  @Test
+  void testListMetadataObjectsForTagFailureEvent() {
+    Assertions.assertThrowsExactly(
+        GravitinoRuntimeException.class,
+        () -> failureDispatcher.listMetadataObjectsForTag("metalake", 
tag.name()));
+    Event event = dummyEventListener.popPostEvent();
+    Assertions.assertEquals(ListMetadataObjectsForTagFailureEvent.class, 
event.getClass());
+    Assertions.assertEquals(
+        GravitinoRuntimeException.class,
+        ((ListMetadataObjectsForTagFailureEvent) 
event).exception().getClass());
+    Assertions.assertEquals(OperationType.LIST_METADATA_OBJECTS_FOR_TAG, 
event.operationType());
+    Assertions.assertEquals(OperationStatus.FAILURE, event.operationStatus());
+  }
+
   @Test
   void testAssociateTagsForMetadataObjectFailureEvent() {
     MetadataObject metadataObject =

Reply via email to