Hello,
My circleci gradle build fails for the following test, when health() is called. The error says “org.junit.ComparisonFailure: expected:<[200]> but was:<[503]>”
@LocalServerPort
private int port;
private String actuatorUrl(String endpoint) {
return "http://localhost:" + port + "/actuator/" + endpoint; }
@Test
public void health() {
HttpResponse response = httpClient.get(actuatorUrl("health"));
**assertThat(response.getStatus()).isEqualTo(200);**
assertThat(response.getBody())
.withFailMessage("The body is " + response.getBody())
.contains("\"UP\"");
}
The build runs successfully within intellij.
It also runs successfully form the command line “./gradlew build”.
I’m running circleci locally, but I get the same failure if I check-in to our github repo.
I’m using OpenJDK 11, Spring Boot 2, and Mac Mohave.
This seems to point to a circleci configuration problem, but any thoughts or ideas are greatly appreciated.
Thanks,
Anne