diff --git a/src/test/java/org/codelibs/fess/it/admin/PluginTests.java b/src/test/java/org/codelibs/fess/it/admin/PluginTests.java index 1f9da9335..a14214581 100644 --- a/src/test/java/org/codelibs/fess/it/admin/PluginTests.java +++ b/src/test/java/org/codelibs/fess/it/admin/PluginTests.java @@ -133,7 +133,8 @@ void testDelete_ng() { void testCRUD() throws Exception { List> available = checkGetMethod(Collections.emptyMap(), getAvailableEndpointSuffix() + "/").body().jsonPath().get("response.plugins"); - final Map targetMap = available.get(0); + final Map targetMap = + available.stream().filter(map -> !map.get("name").toString().startsWith("fess-")).toList().get(0); final Artifact target = getArtifactFromMap(targetMap); // Install @@ -150,11 +151,11 @@ void testCRUD() throws Exception { ThreadUtil.sleep(500); continue; } - assertTrue(exists); + assertTrue("plugin(" + target + ") is included in " + installed, exists); done = true; break; } - assertTrue(done); + assertTrue("plugin(" + target + ") is installed.", done); } // Delete { @@ -170,11 +171,11 @@ void testCRUD() throws Exception { ThreadUtil.sleep(500); continue; } - assertFalse(exists); + assertFalse("plugin(" + target + ") is not included in " + installed, exists); done = true; break; } - assertTrue(done); + assertTrue("plugin(" + target + ") is uninstalled.", done); } }