Skip to content

Commit

Permalink
HSEARCH-4157 Raise the timeout on test
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fax4ever authored and yrodiere committed Feb 17, 2021
1 parent 482ab17 commit ce6a13e
Showing 1 changed file with 10 additions and 3 deletions.
Expand Up @@ -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;
Expand Down Expand Up @@ -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();

Expand All @@ -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();

Expand All @@ -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();

Expand Down

0 comments on commit ce6a13e

Please sign in to comment.