fixed test

This commit is contained in:
Luca Frosini 2021-12-21 13:56:35 +01:00
parent 4b1be3b2d4
commit e63a76fff9
2 changed files with 6 additions and 4 deletions

View File

@ -105,7 +105,7 @@ public class ProfileTest extends ContextTest {
throw new NotFoundException(String.format("%s not found after %d retries", PROFILE_NAME, count));
}
if(!found) {
Thread.sleep(TimeUnit.SECONDS.toMillis(2*count));
Thread.sleep(TimeUnit.SECONDS.toMillis(5*count));
++count;
}
}
@ -123,7 +123,7 @@ public class ProfileTest extends ContextTest {
throw new Exception(String.format("%s still found after %d retries", PROFILE_NAME, count));
}
if(found) {
Thread.sleep(TimeUnit.SECONDS.toMillis(2*count));
Thread.sleep(TimeUnit.SECONDS.toMillis(5*count));
++count;
}
}

View File

@ -154,8 +154,10 @@ public class ResourceTest extends ContextTest {
String itemsString = item.list(10, 0);
logger.debug("Got list", itemsString);
List<String> items = mapper.readValue(itemsString, listType);
String name = items.get(0);
Assert.assertTrue(name.compareTo(NAME_VALUE) != 0);
if(items.size()>0) {
String name = items.get(0);
Assert.assertTrue(name.compareTo(NAME_VALUE) != 0);
}
}