You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ct...@apache.org on 2018/10/22 23:34:50 UTC

[05/50] [abbrv] lucene-solr:jira/solr-12746: LUCENE-8528: we can't have random outputs on input in a test with fixed assertions (test bug).

LUCENE-8528: we can't have random outputs on input in a test with fixed assertions (test bug).


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/16788b86
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/16788b86
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/16788b86

Branch: refs/heads/jira/solr-12746
Commit: 16788b86e073e36e821174908d893caa8b906101
Parents: 5ef4741
Author: Dawid Weiss <dw...@apache.org>
Authored: Mon Oct 15 13:53:08 2018 +0200
Committer: Cassandra Targett <ct...@apache.org>
Committed: Sun Oct 21 15:46:46 2018 -0500

----------------------------------------------------------------------
 lucene/core/src/test/org/apache/lucene/util/fst/TestFSTs.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/16788b86/lucene/core/src/test/org/apache/lucene/util/fst/TestFSTs.java
----------------------------------------------------------------------
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.java
index a6748a3..e431074 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);