fix deletion in /it/CrudTestBase
@@ -81,10 +81,15 @@ public abstract class CrudTestBase extends ITBase {
@AfterEach
protected void tearDown() {
final Map<String, Object> searchBody = createSearchBody(SEARCH_ALL_NUM);
+ int count = 0;
List<String> idList = getIdList(searchBody);
- idList.forEach(id -> {
- checkDeleteMethod(getItemEndpointSuffix() + "/" + id);
- });
+ while(idList.size() > 0 && count < NUM) {
+ final String id = idList.get(0);
+ checkDeleteMethod(getItemEndpointSuffix() + "/" + id.toString());
+ refresh();
+ idList = getIdList(searchBody);
+ count += 1;
+ }
}
@AfterAll
