mirror of https://github.com/apache/lucene.git
SOLR-8388: ReturnFieldsTest.testToString() fix (don't assume ordering within sets' values)
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1720253 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a3b62326a3
commit
e145747165
|
@ -100,13 +100,20 @@ public class ReturnFieldsTest extends SolrTestCaseJ4 {
|
||||||
assertEquals(rf1ToString, rf1.toString());
|
assertEquals(rf1ToString, rf1.toString());
|
||||||
|
|
||||||
final ReturnFields rf2 = new SolrReturnFields(
|
final ReturnFields rf2 = new SolrReturnFields(
|
||||||
req("fl", "id "+SolrReturnFields.SCORE+" test"));
|
req("fl", SolrReturnFields.SCORE));
|
||||||
final String rf2ToString = "SolrReturnFields=(globs=[]"
|
final String rf2ToStringA = "SolrReturnFields=(globs=[]"
|
||||||
+",fields=[score, test, id]"
|
+",fields=["+SolrReturnFields.SCORE+"]"
|
||||||
+",okFieldNames=[null, score, test, id]"
|
+",okFieldNames=[null, "+SolrReturnFields.SCORE+"]"
|
||||||
+",reqFieldNames=[id, score, test]"
|
+",reqFieldNames=["+SolrReturnFields.SCORE+"]"
|
||||||
+",transformer=score,wantsScore=true,wantsAllFields=false)";
|
+",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
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue