mirror of https://github.com/apache/lucene.git
LUCENE-8528: we can't have random outputs on input in a test with fixed assertions (test bug).
This commit is contained in:
parent
a312c0db05
commit
d7fd82c0f8
|
@ -157,7 +157,7 @@ public class TestFSTs extends LuceneTestCase {
|
||||||
final BytesRef NO_OUTPUT = outputs.getNoOutput();
|
final BytesRef NO_OUTPUT = outputs.getNoOutput();
|
||||||
final List<FSTTester.InputOutput<BytesRef>> pairs = new ArrayList<>(terms2.length);
|
final List<FSTTester.InputOutput<BytesRef>> pairs = new ArrayList<>(terms2.length);
|
||||||
for(int idx=0;idx<terms2.length;idx++) {
|
for(int idx=0;idx<terms2.length;idx++) {
|
||||||
final BytesRef output = random().nextInt(30) == 17 ? NO_OUTPUT : new BytesRef(Integer.toString(idx));
|
final BytesRef output = idx == 17 ? NO_OUTPUT : new BytesRef(Integer.toString(idx));
|
||||||
pairs.add(new FSTTester.InputOutput<>(terms2[idx], output));
|
pairs.add(new FSTTester.InputOutput<>(terms2[idx], output));
|
||||||
}
|
}
|
||||||
FSTTester<BytesRef> tester = new FSTTester<>(random(), dir, inputMode, pairs, outputs, false);
|
FSTTester<BytesRef> tester = new FSTTester<>(random(), dir, inputMode, pairs, outputs, false);
|
||||||
|
|
Loading…
Reference in New Issue