Skip to content

Commit

Permalink
waiting for placement, but still flaky
Browse files Browse the repository at this point in the history
  • Loading branch information
salaboy committed Feb 28, 2025
1 parent 744cc8b commit 8b4228d
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.testcontainers.containers.wait.strategy.Wait;
import org.testcontainers.junit.jupiter.Container;
import org.testcontainers.junit.jupiter.Testcontainers;
import static org.testcontainers.shaded.org.awaitility.Awaitility.await;
Expand Down Expand Up @@ -132,11 +131,12 @@ public void testStateStore() throws Exception {
public void testPlacement() throws Exception {

try {
await().atMost(4, TimeUnit.SECONDS)
.pollDelay(400, TimeUnit.MILLISECONDS)
.pollInterval(400, TimeUnit.MILLISECONDS)
await().atMost(10, TimeUnit.SECONDS)
.pollDelay(500, TimeUnit.MILLISECONDS)
.pollInterval(500, TimeUnit.MILLISECONDS)
.until(() -> {
String metadata = checkSideCarMetadata();
String metadata = checkSidecarMetadata();
System.out.println(">>>>>>> Metadata -> \n" + metadata + "\n >>>>>>>>> ");
if (metadata.contains("placement: connected")) {
return true;
} else {
Expand All @@ -149,7 +149,7 @@ public void testPlacement() throws Exception {

}

private String checkSideCarMetadata() throws IOException {
private String checkSidecarMetadata() throws IOException {
OkHttpClient okHttpClient = new OkHttpClient.Builder()
.build();
Request request = new Request.Builder()
Expand Down

0 comments on commit 8b4228d

Please sign in to comment.