mirror of https://github.com/apache/lucene.git
TestHunspell: reduce the flakiness probability (#12351)
* 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>
This commit is contained in:
parent
0c293909c0
commit
5b63a1879d
|
@ -31,6 +31,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.CancellationException;
|
import java.util.concurrent.CancellationException;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
@ -74,7 +75,8 @@ public class TestHunspell extends LuceneTestCase {
|
||||||
};
|
};
|
||||||
|
|
||||||
Hunspell hunspell = new Hunspell(dictionary, RETURN_PARTIAL_RESULT, checkCanceled);
|
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);
|
counter.set(0);
|
||||||
var e =
|
var e =
|
||||||
|
|
Loading…
Reference in New Issue