Skip to content

Commit

Permalink
fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
marevol committed Jul 1, 2024
1 parent 7261c53 commit ca8f4be
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/test/java/org/codelibs/fess/it/admin/PluginTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ void testDelete_ng() {
void testCRUD() throws Exception {
List<Map<String, Object>> available =
checkGetMethod(Collections.emptyMap(), getAvailableEndpointSuffix() + "/").body().jsonPath().get("response.plugins");
final Map<String, Object> targetMap = available.get(0);
final Map<String, Object> targetMap =
available.stream().filter(map -> !map.get("name").toString().startsWith("fess-")).toList().get(0);
final Artifact target = getArtifactFromMap(targetMap);

// Install
Expand All @@ -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
{
Expand All @@ -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);
}
}

Expand Down

0 comments on commit ca8f4be

Please # to comment.