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

[36/50] [abbrv] lucene-solr:jira/http2: 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/d7fd82c0
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/d7fd82c0
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/d7fd82c0

Branch: refs/heads/jira/http2
Commit: d7fd82c0f8517251d67b0af021d259dffaa4dce6
Parents: a312c0d
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:08 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/d7fd82c0/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);