Apache Lucene open-source search software
LUCENE-8528: we can't have random outputs on input in a test with fixed assertions (test bug).
Dawid Weissd7fd82c0f851
diff --git a/lucene/core/src/test/org/apache/lucene/util/fst/TestFSTs.java b/lucene/core/src/test/org/apache/lucene/util/fst/TestFSTs.javaindex a6748a34865..e43107448d3 100644--- a/lucene/core/src/test/org/apache/lucene/util/fst/TestFSTs.java+++ b/lucene/core/src/test/org/apache/lucene/util/fst/TestFSTs.java@@ -157,7 +157,7 @@ public class TestFSTs extends LuceneTestCase {final BytesRef NO_OUTPUT = outputs.getNoOutput();final List<FSTTester.InputOutput<BytesRef>> pairs = new ArrayList<>(terms2.length);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));}FSTTester<BytesRef> tester = new FSTTester<>(random(), dir, inputMode, pairs, outputs, false);