fix deletion in /it/CrudTestBase

This commit is contained in:
Keiichi Watanabe 2017-08-13 05:46:05 +09:00
parent 09f78fb718
commit 3358e594df

View file

@ -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