mirror of https://github.com/apache/lucene.git
Correct test error that allowed an empty array.
This commit is contained in:
parent
d2b88b7a0b
commit
0c13a52df5
|
@ -16,6 +16,7 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.lucene.facet.taxonomy.directory;
|
package org.apache.lucene.facet.taxonomy.directory;
|
||||||
|
|
||||||
|
import com.carrotsearch.randomizedtesting.RandomizedTest;
|
||||||
import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
|
import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
@ -572,7 +573,7 @@ public class TestDirectoryTaxonomyReader extends FacetTestCase {
|
||||||
public void testCallingBulkPathReturnsCorrectResult() throws Exception {
|
public void testCallingBulkPathReturnsCorrectResult() throws Exception {
|
||||||
Directory src = newDirectory();
|
Directory src = newDirectory();
|
||||||
DirectoryTaxonomyWriter w = new DirectoryTaxonomyWriter(src);
|
DirectoryTaxonomyWriter w = new DirectoryTaxonomyWriter(src);
|
||||||
String randomArray[] = new String[random().nextInt(1000)];
|
String randomArray[] = new String[RandomizedTest.randomIntBetween(1, 1000)];
|
||||||
// adding a smaller bound on ints ensures that we will have some duplicate ordinals in random
|
// adding a smaller bound on ints ensures that we will have some duplicate ordinals in random
|
||||||
// test cases
|
// test cases
|
||||||
Arrays.setAll(randomArray, i -> Integer.toString(random().nextInt(500)));
|
Arrays.setAll(randomArray, i -> Integer.toString(random().nextInt(500)));
|
||||||
|
|
Loading…
Reference in New Issue