Skip to content

Commit

Permalink
TestHunspell: reduce the flakiness probability (#12351)
Browse files Browse the repository at this point in the history
* TestHunspell: reduce the flakiness probability

We need to check how the timeout interacts with custom exception-throwing checkCanceled.
The default timeout seems not enough for some CI agents, so let's increase it.

Co-authored-by: Dawid Weiss <dawid.weiss@gmail.com>
(cherry picked from commit 5b63a18)
  • Loading branch information
donnerpeter committed Jun 14, 2023
1 parent a2b47b0 commit d3dcbfd
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -31,6 +31,7 @@
import java.util.Map;
import java.util.Set;
import java.util.concurrent.CancellationException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -74,7 +75,8 @@ public void testCustomCheckCanceledGivesPartialResult() throws Exception {
};

Hunspell hunspell = new Hunspell(dictionary, RETURN_PARTIAL_RESULT, checkCanceled);
assertEquals(expected, hunspell.suggest("apac"));
// pass a long timeout so that slower CI servers are more predictable.
assertEquals(expected, hunspell.suggest("apac", TimeUnit.DAYS.toMillis(1)));

counter.set(0);
var e =
Expand Down

0 comments on commit d3dcbfd

Please sign in to comment.