chibenwa commented on code in PR #2399:
URL: https://github.com/apache/james-project/pull/2399#discussion_r1745328094
##########
server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/routes/HealthCheckRoutesTest.java:
##########
@@ -419,11 +578,25 @@ void
getHealthchecksShouldReturnHealthCheckWhenHealthCheckPresent() {
void getHealthchecksShouldReturnHealthChecksWhenHealthChecksPresent() {
healthChecks.add(healthCheck(Result.healthy(COMPONENT_NAME_2)));
healthChecks.add(healthCheck(Result.healthy(COMPONENT_NAME_3)));
+ updateHealthCheckRoutes();
+
when()
.get(HealthCheckRoutes.CHECKS)
.then()
.body("", hasSize(2))
.statusCode(HttpStatus.OK_200);
}
+ private void updateHealthCheckRoutes() {
Review Comment:
**Evil**
Please do without it
If you need help here are some idea:
- nested tests
- extract a subcomponant and unit test it
- do not change the set data structure to a map.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]