mchades commented on code in PR #4262:
URL: https://github.com/apache/gravitino/pull/4262#discussion_r1701088855


##########
catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopCatalogIT.java:
##########
@@ -137,6 +138,29 @@ private static void dropSchema() {
     Assertions.assertFalse(catalog.asSchemas().schemaExists(schemaName));
   }
 
+  @Test
+  void testAlterCatalogLocation() {
+    String catalogName = 
GravitinoITUtils.genRandomName("test_alter_catalog_location");
+    String location = defaultBaseLocation();
+    String newLocation = location + "/new_location";
+
+    Map<String, String> catalogProperties = ImmutableMap.of("location", 
location);
+    // Create a catalog using location
+    Catalog filesetCatalog =
+        metalake.createCatalog(
+            catalogName, Catalog.Type.FILESET, provider, "comment", 
catalogProperties);
+
+    Assertions.assertEquals(location, 
filesetCatalog.properties().get("location"));
+
+    // Now try to alter the location and change it to `newLocation`.
+    Catalog modifiedCatalog =
+        metalake.alterCatalog(catalogName, 
CatalogChange.setProperty("location", newLocation));
+
+    Assertions.assertEquals(newLocation, 
modifiedCatalog.properties().get("location"));

Review Comment:
   Although this is user behavior, the result is clear, right? If the result is 
fixed, then I think we should test it otherwise we can just ignore



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