lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cpoersc...@apache.org
Subject svn commit: r1720253 - /lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/ReturnFieldsTest.java
Date Tue, 15 Dec 2015 21:12:18 GMT
Author: cpoerschke
Date: Tue Dec 15 21:12:18 2015
New Revision: 1720253

URL: http://svn.apache.org/viewvc?rev=1720253&view=rev
Log:
SOLR-8388: ReturnFieldsTest.testToString() fix (don't assume ordering within sets' values)

Modified:
    lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/ReturnFieldsTest.java

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/ReturnFieldsTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/ReturnFieldsTest.java?rev=1720253&r1=1720252&r2=1720253&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/ReturnFieldsTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/ReturnFieldsTest.java Tue Dec
15 21:12:18 2015
@@ -100,13 +100,20 @@ public class ReturnFieldsTest extends So
     assertEquals(rf1ToString, rf1.toString());
 
     final ReturnFields rf2 = new SolrReturnFields(
-        req("fl", "id "+SolrReturnFields.SCORE+" test"));
-    final String rf2ToString = "SolrReturnFields=(globs=[]"
-        +",fields=[score, test, id]"
-        +",okFieldNames=[null, score, test, id]"
-        +",reqFieldNames=[id, score, test]"
+        req("fl", SolrReturnFields.SCORE));
+    final String rf2ToStringA = "SolrReturnFields=(globs=[]"
+        +",fields=["+SolrReturnFields.SCORE+"]"
+        +",okFieldNames=[null, "+SolrReturnFields.SCORE+"]"
+        +",reqFieldNames=["+SolrReturnFields.SCORE+"]"
         +",transformer=score,wantsScore=true,wantsAllFields=false)";
-    assertEquals(rf2ToString, rf2.toString());
+    final String rf2ToStringB = "SolrReturnFields=(globs=[]"
+        +",fields=["+SolrReturnFields.SCORE+"]"
+        +",okFieldNames=["+SolrReturnFields.SCORE+", null]"
+        +",reqFieldNames=["+SolrReturnFields.SCORE+"]"
+        +",transformer=score,wantsScore=true,wantsAllFields=false)";
+    assertTrue(
+        rf2ToStringA.equals(rf2.toString()) ||
+        rf2ToStringB.equals(rf2.toString()));
   }
 
   @Test



Mime
View raw message