Abyss-lord commented on code in PR #6425:
URL: https://github.com/apache/gravitino/pull/6425#discussion_r1948437498


##########
clients/cli/src/test/java/org/apache/gravitino/cli/TestCatalogCommands.java:
##########
@@ -253,24 +246,22 @@ void testSetCatalogPropertyCommand() {
     doReturn(mockSetProperty)
         .when(commandLine)
         .newSetCatalogProperty(
-            GravitinoCommandLine.DEFAULT_URL,
-            false,
-            "metalake_demo",
-            "catalog",
-            "property",
-            "value");
+            any(CommandContext.class),
+            eq("metalake_demo"),
+            eq("catalog"),
+            eq("property"),
+            eq("value"));
     doReturn(mockSetProperty).when(mockSetProperty).validate();
     commandLine.handleCommandLine();
     verify(mockSetProperty).handle();
   }
 
   @Test
   void testSetCatalogPropertyCommandWithoutPropertyAndValue() {
-    Main.useExit = false;

Review Comment:
   because it move to `setUp` method



##########
clients/cli/src/test/java/org/apache/gravitino/cli/TestCatalogCommands.java:
##########
@@ -163,31 +161,28 @@ void testCreateCatalogCommand() {
     doReturn(mockCreate)
         .when(commandLine)
         .newCreateCatalog(
-            GravitinoCommandLine.DEFAULT_URL,
-            false,
-            "metalake_demo",
-            "catalog",
-            "postgres",
-            "comment",
-            map);
+            any(CommandContext.class),
+            eq("metalake_demo"),
+            eq("catalog"),
+            eq("postgres"),
+            eq("comment"),
+            argThat(
+                stringStringMap ->
+                    stringStringMap.containsKey("key1")
+                        && stringStringMap.get("key1").equals(map.get("key1"))
+                        && stringStringMap.containsKey("key2")
+                        && stringStringMap.get("key2").equals("value2")));
     doReturn(mockCreate).when(mockCreate).validate();
     commandLine.handleCommandLine();
     verify(mockCreate).handle();
   }
 
   @Test
   void testCreateCatalogCommandWithoutProvider() {
-    Main.useExit = false;

Review Comment:
   because it move to `setUp` method



-- 
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: commits-unsubscr...@gravitino.apache.org

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

Reply via email to