From ce6a13eb7ae2570077ae84bc835e1d957e2706ba Mon Sep 17 00:00:00 2001 From: Fabio Massimo Ercoli Date: Wed, 17 Feb 2021 18:19:48 +0100 Subject: [PATCH] HSEARCH-4157 Raise the timeout on test In the case of commitStrategy=force we're going to do 200 almost concurrent commits, that is very unrealistic use case. So we will use a very large timeout here. --- .../backend/tck/work/IndexIndexerIT.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/integrationtest/backend/tck/src/main/java/org/hibernate/search/integrationtest/backend/tck/work/IndexIndexerIT.java b/integrationtest/backend/tck/src/main/java/org/hibernate/search/integrationtest/backend/tck/work/IndexIndexerIT.java index 1b72b10cbbe..ee2514905b7 100644 --- a/integrationtest/backend/tck/src/main/java/org/hibernate/search/integrationtest/backend/tck/work/IndexIndexerIT.java +++ b/integrationtest/backend/tck/src/main/java/org/hibernate/search/integrationtest/backend/tck/work/IndexIndexerIT.java @@ -15,6 +15,7 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.TimeUnit; import org.hibernate.search.engine.backend.document.IndexFieldReference; import org.hibernate.search.engine.backend.document.model.dsl.IndexSchemaElement; @@ -91,7 +92,9 @@ public void success() { ); } CompletableFuture future = CompletableFuture.allOf( tasks ); - Awaitility.await().until( future::isDone ); + // In the case of commitStrategy=force we're going to do 200 almost concurrent commits, + // that is very unrealistic use case. So we will use a very large timeout here. + Awaitility.await().timeout( 30, TimeUnit.SECONDS ).until( future::isDone ); // The operations should succeed. assertThatFuture( future ).isSuccessful(); @@ -114,7 +117,9 @@ public void success() { ); } future = CompletableFuture.allOf( tasks ); - Awaitility.await().until( future::isDone ); + // In the case of commitStrategy=force we're going to do 200 almost concurrent commits, + // that is very unrealistic use case. So we will use a very large timeout here. + Awaitility.await().timeout( 30, TimeUnit.SECONDS ).until( future::isDone ); // The operations should succeed. assertThatFuture( future ).isSuccessful(); @@ -136,7 +141,9 @@ public void success() { ); } future = CompletableFuture.allOf( tasks ); - Awaitility.await().until( future::isDone ); + // In the case of commitStrategy=force we're going to do 200 almost concurrent commits, + // that is very unrealistic use case. So we will use a very large timeout here. + Awaitility.await().timeout( 30, TimeUnit.SECONDS ).until( future::isDone ); // The operations should succeed. assertThatFuture( future ).isSuccessful();