summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
017bd73)
Change-Id: I4f94ae9b948210e613a6bc356772ce169b8714e2
Signed-off-by: elinuxhenrik <henrik.b.andersson@est.tech>
*
* @throws ServiceException
*/
*
* @throws ServiceException
*/
- void testErrorFromRIC() throws ServiceException {
+ void testErrorFromRic() throws ServiceException {
putService("service1");
addPolicyType("type1", "ric1");
putService("service1");
addPolicyType("type1", "ric1");
List<ServiceStatus> info = parseList(rsp, ServiceStatus.class);
assertThat(info).hasSize(1);
ServiceStatus status = info.iterator().next();
List<ServiceStatus> info = parseList(rsp, ServiceStatus.class);
assertThat(info).hasSize(1);
ServiceStatus status = info.iterator().next();
- assertThat(status.keepAliveIntervalSeconds).isEqualTo(0);
+ assertThat(status.keepAliveIntervalSeconds).isZero();
assertThat(status.serviceName).isEqualTo(serviceName);
// GET (all)
assertThat(status.serviceName).isEqualTo(serviceName);
// GET (all)
assertThat(services.size()).isEqualTo(1);
url = "/services?name=name";
restClient().delete(url).block();
assertThat(services.size()).isEqualTo(1);
url = "/services?name=name";
restClient().delete(url).block();
- assertThat(services.size()).isEqualTo(0);
+ assertThat(services.size()).isZero();
// Keep alive, no registered service
testErrorCode(restClient().put("/services/keepalive?name=name", ""), HttpStatus.NOT_FOUND);
// Keep alive, no registered service
testErrorCode(restClient().put("/services/keepalive?name=name", ""), HttpStatus.NOT_FOUND);
assertThat(services.size()).isEqualTo(1);
// Timeout after ~1 second
assertThat(services.size()).isEqualTo(1);
// Timeout after ~1 second
- await().untilAsserted(() -> assertThat(policies.size()).isEqualTo(0));
- assertThat(services.size()).isEqualTo(0);
+ await().untilAsserted(() -> assertThat(policies.size()).isZero());
+ assertThat(services.size()).isZero();
for (Thread t : threads) {
t.join();
}
for (Thread t : threads) {
t.join();
}
- assertThat(policies.size()).isEqualTo(0);
+ assertThat(policies.size()).isZero();
logger.info("Concurrency test took " + Duration.between(startTime, Instant.now()));
}
logger.info("Concurrency test took " + Duration.between(startTime, Instant.now()));
}
// Then
verify(refreshTaskUnderTest).loadConfigurationFromFile();
// Then
verify(refreshTaskUnderTest).loadConfigurationFromFile();
- assertThat(appConfig.getRicConfigs()).hasSize(0);
+ assertThat(appConfig.getRicConfigs()).isEmpty();
await().until(() -> logAppender.list.size() > 0);
assertThat(logAppender.list.get(0).getFormattedMessage())
await().until(() -> logAppender.list.size() > 0);
assertThat(logAppender.list.get(0).getFormattedMessage())