From e1af4182d607d11c46b5c38c43b56584c9ff367f Mon Sep 17 00:00:00 2001 From: Egor Potemkin Date: Thu, 9 Nov 2023 19:08:44 +0000 Subject: [PATCH] Fix random test TestDirectoryTaxonomyReader#TestDirectoryTaxonomyReader (#12790) --- .../facet/taxonomy/directory/TestDirectoryTaxonomyReader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestDirectoryTaxonomyReader.java b/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestDirectoryTaxonomyReader.java index 0e79711cb3b..246edff6641 100644 --- a/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestDirectoryTaxonomyReader.java +++ b/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestDirectoryTaxonomyReader.java @@ -701,7 +701,7 @@ public class TestDirectoryTaxonomyReader extends FacetTestCase { threadIterations++) { // length of the FacetLabel array that we are going to check - int numOfOrdinalsToCheck = random().nextInt(allOrdinals.length); + int numOfOrdinalsToCheck = RandomizedTest.randomIntBetween(1, allOrdinals.length); int[] ordinals = new int[numOfOrdinalsToCheck]; FacetLabel[] path = new FacetLabel[numOfOrdinalsToCheck];