From 4dceee5f56ab808a1d42456d316bd46fe5467b93 Mon Sep 17 00:00:00 2001 From: Jonas Bulcke <127748878+jobulcke@users.noreply.github.com> Date: Thu, 5 Dec 2024 13:33:42 +0100 Subject: [PATCH] hotfix: flaky test (#1449) * attempt to fix flaky test * chore: use less starving polling interval * chore: use less exhausting polling interval --- .../informatievlaanderen/ldes/server/FragmentationSteps.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ldes-server-integration-test/src/test/java/be/vlaanderen/informatievlaanderen/ldes/server/FragmentationSteps.java b/ldes-server-integration-test/src/test/java/be/vlaanderen/informatievlaanderen/ldes/server/FragmentationSteps.java index 8eb2e9b39..38464c432 100644 --- a/ldes-server-integration-test/src/test/java/be/vlaanderen/informatievlaanderen/ldes/server/FragmentationSteps.java +++ b/ldes-server-integration-test/src/test/java/be/vlaanderen/informatievlaanderen/ldes/server/FragmentationSteps.java @@ -24,6 +24,7 @@ import static org.apache.jena.rdf.model.ResourceFactory.createResource; import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.await; +import static org.awaitility.pollinterval.IterativePollInterval.iterative; import static org.hamcrest.core.StringContains.containsString; import static org.junit.jupiter.api.Assertions.*; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; @@ -60,7 +61,9 @@ private void fetchFragment(String path) throws Exception { @And("I fetch the next fragment through the first {string}") public void iFetchTheNextFragmentThroughTheFirst(String relation) { - await().atMost(90, TimeUnit.SECONDS) + await() + .atMost(90, TimeUnit.SECONDS) + .pollInterval(iterative(duration -> duration.getSeconds() < 10 ? duration.plus(1, ChronoUnit.SECONDS) : duration)) .untilAsserted(() -> { fetchFragment(currentPath); assertNotNull(currentFragment);