lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [44/50] lucene-solr:jira/solr-12181: Disable rewrite optimizations that can make the test fail because of floating-point rounding errors.
Date Tue, 10 Apr 2018 14:12:23 GMT
Disable rewrite optimizations that can make the test fail because of floating-point rounding
errors.


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

Branch: refs/heads/jira/solr-12181
Commit: b82f5912a05ceffd28cf2a600c701e2fb387014d
Parents: 6568f3b
Author: Adrien Grand <jpountz@gmail.com>
Authored: Mon Apr 9 10:22:23 2018 +0200
Committer: Adrien Grand <jpountz@gmail.com>
Committed: Mon Apr 9 10:22:53 2018 +0200

----------------------------------------------------------------------
 .../TestApproximationSearchEquivalence.java     | 30 ++++++++++++++++----
 1 file changed, 24 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b82f5912/lucene/core/src/test/org/apache/lucene/search/TestApproximationSearchEquivalence.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestApproximationSearchEquivalence.java
b/lucene/core/src/test/org/apache/lucene/search/TestApproximationSearchEquivalence.java
index a4926fc..89fc12a 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestApproximationSearchEquivalence.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestApproximationSearchEquivalence.java
@@ -44,7 +44,10 @@ public class TestApproximationSearchEquivalence extends SearchEquivalenceTestBas
 
   public void testNestedConjunction() throws Exception {
     Term t1 = randomTerm();
-    Term t2 = randomTerm();
+    Term t2;
+    do {
+      t2 = randomTerm();
+    } while (t1.equals(t2));
     Term t3 = randomTerm();
     TermQuery q1 = new TermQuery(t1);
     TermQuery q2 = new TermQuery(t2);
@@ -88,7 +91,10 @@ public class TestApproximationSearchEquivalence extends SearchEquivalenceTestBas
 
   public void testNestedDisjunction() throws Exception {
     Term t1 = randomTerm();
-    Term t2 = randomTerm();
+    Term t2;
+    do {
+      t2 = randomTerm();
+    } while (t1.equals(t2));
     Term t3 = randomTerm();
     TermQuery q1 = new TermQuery(t1);
     TermQuery q2 = new TermQuery(t2);
@@ -115,7 +121,10 @@ public class TestApproximationSearchEquivalence extends SearchEquivalenceTestBas
 
   public void testDisjunctionInConjunction() throws Exception {
     Term t1 = randomTerm();
-    Term t2 = randomTerm();
+    Term t2;
+    do {
+      t2 = randomTerm();
+    } while (t1.equals(t2));
     Term t3 = randomTerm();
     TermQuery q1 = new TermQuery(t1);
     TermQuery q2 = new TermQuery(t2);
@@ -142,7 +151,10 @@ public class TestApproximationSearchEquivalence extends SearchEquivalenceTestBas
 
   public void testConjunctionInDisjunction() throws Exception {
     Term t1 = randomTerm();
-    Term t2 = randomTerm();
+    Term t2;
+    do {
+      t2 = randomTerm();
+    } while (t1.equals(t2));
     Term t3 = randomTerm();
     TermQuery q1 = new TermQuery(t1);
     TermQuery q2 = new TermQuery(t2);
@@ -203,7 +215,10 @@ public class TestApproximationSearchEquivalence extends SearchEquivalenceTestBas
 
   public void testNestedExclusion() throws Exception {
     Term t1 = randomTerm();
-    Term t2 = randomTerm();
+    Term t2;
+    do {
+      t2 = randomTerm();
+    } while (t1.equals(t2));
     Term t3 = randomTerm();
     TermQuery q1 = new TermQuery(t1);
     TermQuery q2 = new TermQuery(t2);
@@ -253,7 +268,10 @@ public class TestApproximationSearchEquivalence extends SearchEquivalenceTestBas
 
   public void testReqOpt() throws Exception {
     Term t1 = randomTerm();
-    Term t2 = randomTerm();
+    Term t2;
+    do {
+      t2 = randomTerm();
+    } while (t1.equals(t2));
     Term t3 = randomTerm();
     TermQuery q1 = new TermQuery(t1);
     TermQuery q2 = new TermQuery(t2);


Mime
View raw message