You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2018/10/15 11:53:45 UTC

[4/4] lucene-solr:branch_7x: 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/69584f41
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/69584f41
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/69584f41

Branch: refs/heads/branch_7x
Commit: 69584f413021e253e63120172e7304f1d7ddacd7
Parents: 156f6b5
Author: Dawid Weiss <dw...@apache.org>
Authored: Mon Oct 15 13:53:08 2018 +0200
Committer: Dawid Weiss <dw...@apache.org>
Committed: Mon Oct 15 13:53:26 2018 +0200

----------------------------------------------------------------------
 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/69584f41/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 6f704c9..901de03 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);