Skip to content

Commit

Permalink
fix/flaky-test (#1448)
Browse files Browse the repository at this point in the history
* Revert "chore(deps): bump cucumber.version from 7.15.0 to 7.20.1 (#1420)"

This reverts commit 44a478f.

* attempt to fix flaky test

* chore: use less starving polling interval

* chore: use less exhausting polling interval
  • Loading branch information
jobulcke authored Dec 5, 2024
1 parent ba9f28e commit 5c932f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<byte-buddy.version>1.14.12</byte-buddy.version>
<wiremock-jre8.version>2.35.2</wiremock-jre8.version>
<awaitility.version>4.2.0</awaitility.version>
<cucumber.version>7.20.1</cucumber.version>
<cucumber.version>7.15.0</cucumber.version>
<assertj-core.version>3.25.3</assertj-core.version>

<!-- VULNERABILITY -->
Expand Down

0 comments on commit 5c932f5

Please sign in to comment.