diff --git a/paimon-web-server/src/test/java/org/apache/paimon/web/server/controller/DatabaseControllerTest.java b/paimon-web-server/src/test/java/org/apache/paimon/web/server/controller/DatabaseControllerTest.java index 73eec86c8..b93e51c4b 100644 --- a/paimon-web-server/src/test/java/org/apache/paimon/web/server/controller/DatabaseControllerTest.java +++ b/paimon-web-server/src/test/java/org/apache/paimon/web/server/controller/DatabaseControllerTest.java @@ -107,16 +107,13 @@ public void setup() throws Exception { @AfterEach public void after() throws Exception { - DatabaseDTO dropDatabase = new DatabaseDTO(); - dropDatabase.setCatalogName(catalogName); - dropDatabase.setCatalogId(catalogId); - dropDatabase.setName(databaseName); - dropDatabase.setIgnoreIfExists(true); - dropDatabase.setCascade(true); + CatalogDTO removeCatalog = new CatalogDTO(); + removeCatalog.setId(catalogId); + removeCatalog.setName(catalogName); mockMvc.perform( - MockMvcRequestBuilders.post(databasePath + "/drop") + MockMvcRequestBuilders.post(catalogPath + "/remove") .cookie(cookie) - .content(ObjectMapperUtils.toJSON(dropDatabase)) + .content(ObjectMapperUtils.toJSON(removeCatalog)) .contentType(MediaType.APPLICATION_JSON_VALUE) .accept(MediaType.APPLICATION_JSON_VALUE)) .andExpect(MockMvcResultMatchers.status().isOk());