justinmclean commented on code in PR #6163: URL: https://github.com/apache/gravitino/pull/6163#discussion_r1917648469
########## clients/cli/src/test/java/org/apache/gravitino/cli/TestCatalogCommands.java: ########## @@ -525,12 +525,19 @@ void testCatalogWithDisableAndEnableOptions() { new GravitinoCommandLine( mockCommandLine, mockOptions, CommandEntities.CATALOG, CommandActions.UPDATE)); - assertThrows(RuntimeException.class, commandLine::handleCommandLine); - verify(commandLine, never()) - .newCatalogEnable( - GravitinoCommandLine.DEFAULT_URL, false, "metalake_demo", "catalog", false); - verify(commandLine, never()) - .newCatalogDisable(GravitinoCommandLine.DEFAULT_URL, false, "melake_demo", "catalog"); - assertTrue(errContent.toString().contains(ErrorMessages.INVALID_ENABLE_DISABLE)); + assertThrows( + RuntimeException.class, + () -> + commandLine + .newCatalogEnable( + GravitinoCommandLine.DEFAULT_URL, + false, + "metalake_demo", + "catalog", + true, + false) + .validate()); + String errOutput = new String(errContent.toByteArray(), StandardCharsets.UTF_8).trim(); + Assertions.assertEquals(ErrorMessages.INVALID_ENABLE_DISABLE, errOutput); Review Comment: So why change existing working tests that are needed? Did you mean to add a new test instead? -- 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