haizhou-zhao commented on code in PR #6045:
URL: https://github.com/apache/iceberg/pull/6045#discussion_r1013014239


##########
hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveCatalog.java:
##########
@@ -448,6 +540,36 @@ public void testRemoveNamespaceProperties() throws 
TException {
         });
   }
 
+  @Test
+  public void testRemoveNamespaceOwnership() throws TException {
+    Map<String, String> prop = ImmutableMap.of(TableProperties.HMS_DB_OWNER, 
"some_owner");
+    removeNamespaceOwnershipAndVerify("remove_individual_ownership", prop);
+    prop =
+        ImmutableMap.of(
+            TableProperties.HMS_DB_OWNER,
+            "some_owner",
+            TableProperties.HMS_DB_OWNER_TYPE,
+            PrincipalType.GROUP.name());
+    removeNamespaceOwnershipAndVerify("remove_group_ownership", prop);
+  }
+
+  private void removeNamespaceOwnershipAndVerify(String name, Map<String, 
String> prop)

Review Comment:
   Let's allow the test to execute on databases without ownership.
   
   In case customer removes ownership on databases which does not have any 
ownership set (ownership equals default value), then it's a noop (ownership 
stays with default).



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to