lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwe...@apache.org
Subject [2/4] lucene-solr:master: LUCENE-8528: we can't have random outputs on input in a test with fixed assertions (test bug).
Date Mon, 15 Oct 2018 11:53:43 GMT
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/master
Commit: d7fd82c0f8517251d67b0af021d259dffaa4dce6
Parents: a312c0d
Author: Dawid Weiss <dweiss@apache.org>
Authored: Mon Oct 15 13:53:08 2018 +0200
Committer: Dawid Weiss <dweiss@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);


Mime
View raw message