Skip to content

Commit

Permalink
fixup! Add health check API endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
oneonestar committed Jan 24, 2025
1 parent 49f4ed6 commit 72becaa
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import static com.google.common.collect.MoreCollectors.onlyElement;
import static com.google.common.net.HttpHeaders.CONTENT_TYPE;
import static com.google.common.net.MediaType.JSON_UTF_8;
import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
import static org.assertj.core.api.Assertions.assertThat;
import static org.testcontainers.utility.MountableFile.forClasspathResource;

Expand Down Expand Up @@ -369,6 +370,7 @@ void testHealthCheckEndpoints()
Response livenessResponse = httpClient.newCall(livenessCheck).execute();
assertThat(livenessResponse.code()).isEqualTo(200);

sleepUninterruptibly(1, TimeUnit.SECONDS); // wait for server initialization
Request readinessCheck = new Request.Builder()
.url("http://localhost:" + routerPort + "/trino-gateway/readyz")
.build();
Expand Down

0 comments on commit 72becaa

Please sign in to comment.