[ 
https://issues.apache.org/jira/browse/SOLR-10474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15963382#comment-15963382
 ] 

Steve Rowe edited comment on SOLR-10474 at 4/10/17 7:20 PM:
------------------------------------------------------------

This patch causes the tests to succeed for me with the previously failing seed:

{noformat}
diff --git a/solr/core/src/test/org/apache/solr/schema/TestPointFields.java 
b/solr/core/src/test/org/apache/solr/schema/TestPointFields.java
index 36e8c1031f..ad1ddace64 100644
--- a/solr/core/src/test/org/apache/solr/schema/TestPointFields.java
+++ b/solr/core/src/test/org/apache/solr/schema/TestPointFields.java
@@ -925,8 +925,8 @@ public class TestPointFields extends SolrTestCaseJ4 {
     assertU(commit());
     String[] expected = new String[values.length + 1];
     expected[0] = "//*[@numFound='" + values.length + "']"; 
-    for (int i = 1; i <= values.length; i++) {
-      expected[i] = "//result/doc[" + i + "]/" + type + "[@name='" + field + 
"'][.='" + values[i-1] + "']";
+    for (int i = 0; i < values.length; i++) {
+      expected[i + 1] = "//result/doc[str[@name='id']='" + i + "']/" + type + 
"[@name='" + field + "'][.='" + values[i] + "']";
{noformat}


was (Author: steve_rowe):
This patch with the failing seed causes the tests to succeed for me:

{noformat}
diff --git a/solr/core/src/test/org/apache/solr/schema/TestPointFields.java 
b/solr/core/src/test/org/apache/solr/schema/TestPointFields.java
index 36e8c1031f..ad1ddace64 100644
--- a/solr/core/src/test/org/apache/solr/schema/TestPointFields.java
+++ b/solr/core/src/test/org/apache/solr/schema/TestPointFields.java
@@ -925,8 +925,8 @@ public class TestPointFields extends SolrTestCaseJ4 {
     assertU(commit());
     String[] expected = new String[values.length + 1];
     expected[0] = "//*[@numFound='" + values.length + "']"; 
-    for (int i = 1; i <= values.length; i++) {
-      expected[i] = "//result/doc[" + i + "]/" + type + "[@name='" + field + 
"'][.='" + values[i-1] + "']";
+    for (int i = 0; i < values.length; i++) {
+      expected[i + 1] = "//result/doc[str[@name='id']='" + i + "']/" + type + 
"[@name='" + field + "'][.='" + values[i] + "']";
{noformat}

> TestPointFields.testPointFieldReturn() depends on order of unsorted hits
> ------------------------------------------------------------------------
>
>                 Key: SOLR-10474
>                 URL: https://issues.apache.org/jira/browse/SOLR-10474
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Steve Rowe
>            Priority: Minor
>
> ASF Jenkins found a reproducing seed for two failing TestPointFields tests 
> that use this utility method 
> [https://builds.apache.org/job/Lucene-Solr-NightlyTests-master/1275/]:
> {noformat}
>    [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestPointFields 
> -Dtests.method=testDoublePointFieldReturn -Dtests.seed=7CCA543C436F2E33 
> -Dtests.multiplier=2 -Dtests.nightly=true -Dtests.slow=true 
> -Dtests.linedocsfile=/home/jenkins/jenkins-slave/workspace/Lucene-Solr-NightlyTests-master/test-data/enwiki.random.lines.txt
>  -Dtests.locale=lt-LT -Dtests.timezone=Africa/Maseru -Dtests.asserts=true 
> -Dtests.file.encoding=US-ASCII
>    [junit4] ERROR   1.13s J2 | TestPointFields.testDoublePointFieldReturn <<<
>    [junit4]    > Throwable #1: java.lang.RuntimeException: Exception during 
> query
>    [junit4]    >        at 
> __randomizedtesting.SeedInfo.seed([7CCA543C436F2E33:49B1140149781C9D]:0)
>    [junit4]    >        at 
> org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:882)
>    [junit4]    >        at 
> org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:849)
>    [junit4]    >        at 
> org.apache.solr.schema.TestPointFields.testPointFieldReturn(TestPointFields.java:1146)
>    [junit4]    >        at 
> org.apache.solr.schema.TestPointFields.testDoublePointFieldReturn(TestPointFields.java:257)
>    [junit4]    >        at java.lang.Thread.run(Thread.java:745)
>    [junit4]    > Caused by: java.lang.RuntimeException: REQUEST FAILED: 
> xpath=//result/doc[1]/double[@name='number_p_d'][.='7.929467157567953']
>    [junit4]    >        xml response was: <?xml version="1.0" 
> encoding="UTF-8"?>
>    [junit4]    > <response>
>    [junit4]    > <lst name="responseHeader"><int name="status">0</int><int 
> name="QTime">0</int></lst><result name="response" numFound="41" 
> start="0"><doc><str name="id">8</str><double 
> name="number_p_d">1.5323452779726598</double></doc><doc><str 
> name="id">9</str><double 
> name="number_p_d">8.338396786658262</double></doc><doc><str 
> name="id">10</str><double 
> name="number_p_d">0.8848481289471721</double></doc><doc><str 
> name="id">11</str><double 
> name="number_p_d">1.788187818010275</double></doc><doc><str 
> name="id">12</str><double 
> name="number_p_d">9.940386508453189</double></doc><doc><str 
> name="id">13</str><double 
> name="number_p_d">9.230437297186704</double></doc><doc><str 
> name="id">14</str><double 
> name="number_p_d">0.03695443686259847</double></doc><doc><str 
> name="id">15</str><double 
> name="number_p_d">6.062402222909059</double></doc><doc><str 
> name="id">0</str><double 
> name="number_p_d">7.929467157567953</double></doc><doc><str 
> name="id">1</str><double 
> name="number_p_d">2.8518862278316472</double></doc><doc><str 
> name="id">2</str><double 
> name="number_p_d">9.232377201018501</double></doc><doc><str 
> name="id">3</str><double 
> name="number_p_d">5.523437785026735</double></doc><doc><str 
> name="id">4</str><double 
> name="number_p_d">2.5495248593851816</double></doc><doc><str 
> name="id">5</str><double 
> name="number_p_d">2.595282295313731</double></doc><doc><str 
> name="id">6</str><double 
> name="number_p_d">1.706901633525536</double></doc><doc><str 
> name="id">7</str><double 
> name="number_p_d">8.337614429097936</double></doc><doc><str 
> name="id">16</str><double 
> name="number_p_d">4.192267158889546</double></doc><doc><str 
> name="id">17</str><double 
> name="number_p_d">6.036500637361764</double></doc><doc><str 
> name="id">18</str><double 
> name="number_p_d">7.045082780424822</double></doc><doc><str 
> name="id">19</str><double 
> name="number_p_d">2.659311525644993</double></doc><doc><str 
> name="id">20</str><double 
> name="number_p_d">7.846652127170829</double></doc><doc><str 
> name="id">21</str><double 
> name="number_p_d">9.153879325947273</double></doc><doc><str 
> name="id">22</str><double 
> name="number_p_d">7.278516639091967</double></doc><doc><str 
> name="id">23</str><double 
> name="number_p_d">2.0359975457885437</double></doc><doc><str 
> name="id">24</str><double 
> name="number_p_d">6.695037886985271</double></doc><doc><str 
> name="id">25</str><double 
> name="number_p_d">5.457626987726848</double></doc><doc><str 
> name="id">26</str><double 
> name="number_p_d">6.042941653007899</double></doc><doc><str 
> name="id">27</str><double 
> name="number_p_d">5.409750064912645</double></doc><doc><str 
> name="id">28</str><double 
> name="number_p_d">4.621185908474413</double></doc><doc><str 
> name="id">29</str><double 
> name="number_p_d">6.096017811087675</double></doc><doc><str 
> name="id">30</str><double 
> name="number_p_d">0.008110482957183196</double></doc><doc><str 
> name="id">31</str><double 
> name="number_p_d">7.6841922418455155</double></doc><doc><str 
> name="id">32</str><double 
> name="number_p_d">5.213670171712261</double></doc><doc><str 
> name="id">33</str><double 
> name="number_p_d">4.280634027992924</double></doc><doc><str 
> name="id">34</str><double 
> name="number_p_d">9.339717870434551</double></doc><doc><str 
> name="id">35</str><double 
> name="number_p_d">6.137897506380662</double></doc><doc><str 
> name="id">36</str><double 
> name="number_p_d">1.4642296339962535</double></doc><doc><str 
> name="id">37</str><double 
> name="number_p_d">2.7908718306011293</double></doc><doc><str 
> name="id">38</str><double 
> name="number_p_d">4.477171206737019</double></doc><doc><str 
> name="id">39</str><double 
> name="number_p_d">9.996703701243861</double></doc><doc><str 
> name="id">40</str><double 
> name="number_p_d">5.896233962122022</double></doc></result>
>    [junit4]    > </response>
>    [junit4]    >        request was:q=*:*&fl=id,+number_p_d&rows=41&wt=xml
>    [junit4]    >        at 
> org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:875)
> [...]
>    [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestPointFields 
> -Dtests.method=testFloatPointFieldReturn -Dtests.seed=7CCA543C436F2E33 
> -Dtests.multiplier=2 -Dtests.nightly=true -Dtests.slow=true 
> -Dtests.linedocsfile=/home/jenkins/jenkins-slave/workspace/Lucene-Solr-NightlyTests-master/test-data/enwiki.random.lines.txt
>  -Dtests.locale=lt-LT -Dtests.timezone=Africa/Maseru -Dtests.asserts=true 
> -Dtests.file.encoding=US-ASCII
>    [junit4] ERROR   0.37s J2 | TestPointFields.testFloatPointFieldReturn <<<
>    [junit4]    > Throwable #1: java.lang.RuntimeException: Exception during 
> query
>    [junit4]    >        at 
> __randomizedtesting.SeedInfo.seed([7CCA543C436F2E33:4D559A37318D87D4]:0)
>    [junit4]    >        at 
> org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:882)
>    [junit4]    >        at 
> org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:849)
>    [junit4]    >        at 
> org.apache.solr.schema.TestPointFields.testPointFieldReturn(TestPointFields.java:1146)
>    [junit4]    >        at 
> org.apache.solr.schema.TestPointFields.testFloatPointFieldReturn(TestPointFields.java:446)
>    [junit4]    >        at java.lang.Thread.run(Thread.java:745)
>    [junit4]    > Caused by: java.lang.RuntimeException: REQUEST FAILED: 
> xpath=//result/doc[1]/float[@name='number_p_f'][.='0.4909742']
>    [junit4]    >        xml response was: <?xml version="1.0" 
> encoding="UTF-8"?>
>    [junit4]    > <response>
>    [junit4]    > <lst name="responseHeader"><int name="status">0</int><int 
> name="QTime">0</int></lst><result name="response" numFound="44" 
> start="0"><doc><str name="id">8</str><float 
> name="number_p_f">4.1860685</float></doc><doc><str name="id">9</str><float 
> name="number_p_f">0.59685767</float></doc><doc><str name="id">10</str><float 
> name="number_p_f">4.506048</float></doc><doc><str name="id">11</str><float 
> name="number_p_f">7.999423</float></doc><doc><str name="id">12</str><float 
> name="number_p_f">6.4360957</float></doc><doc><str name="id">13</str><float 
> name="number_p_f">0.7272601</float></doc><doc><str name="id">14</str><float 
> name="number_p_f">7.4582596</float></doc><doc><str name="id">15</str><float 
> name="number_p_f">6.8724484</float></doc><doc><str name="id">0</str><float 
> name="number_p_f">0.4909742</float></doc><doc><str name="id">1</str><float 
> name="number_p_f">7.5719204</float></doc><doc><str name="id">2</str><float 
> name="number_p_f">0.20378053</float></doc><doc><str name="id">3</str><float 
> name="number_p_f">0.62894464</float></doc><doc><str name="id">4</str><float 
> name="number_p_f">0.7083124</float></doc><doc><str name="id">5</str><float 
> name="number_p_f">4.726786</float></doc><doc><str name="id">6</str><float 
> name="number_p_f">2.1256046</float></doc><doc><str name="id">7</str><float 
> name="number_p_f">0.8213341</float></doc><doc><str name="id">16</str><float 
> name="number_p_f">1.6234773</float></doc><doc><str name="id">17</str><float 
> name="number_p_f">5.9374995</float></doc><doc><str name="id">18</str><float 
> name="number_p_f">0.9019512</float></doc><doc><str name="id">19</str><float 
> name="number_p_f">9.160443</float></doc><doc><str name="id">20</str><float 
> name="number_p_f">1.2007517</float></doc><doc><str name="id">21</str><float 
> name="number_p_f">6.113803</float></doc><doc><str name="id">22</str><float 
> name="number_p_f">5.2494755</float></doc><doc><str name="id">23</str><float 
> name="number_p_f">8.203841</float></doc><doc><str name="id">24</str><float 
> name="number_p_f">7.0899634</float></doc><doc><str name="id">25</str><float 
> name="number_p_f">4.759904</float></doc><doc><str name="id">26</str><float 
> name="number_p_f">5.7973614</float></doc><doc><str name="id">27</str><float 
> name="number_p_f">9.73888</float></doc><doc><str name="id">28</str><float 
> name="number_p_f">0.75692415</float></doc><doc><str name="id">29</str><float 
> name="number_p_f">9.986328</float></doc><doc><str name="id">30</str><float 
> name="number_p_f">3.5090904</float></doc><doc><str name="id">31</str><float 
> name="number_p_f">4.8126516</float></doc><doc><str name="id">32</str><float 
> name="number_p_f">5.249214</float></doc><doc><str name="id">33</str><float 
> name="number_p_f">1.2050235</float></doc><doc><str name="id">34</str><float 
> name="number_p_f">8.183576</float></doc><doc><str name="id">35</str><float 
> name="number_p_f">2.9626477</float></doc><doc><str name="id">36</str><float 
> name="number_p_f">0.6687838</float></doc><doc><str name="id">37</str><float 
> name="number_p_f">9.69768</float></doc><doc><str name="id">38</str><float 
> name="number_p_f">9.276188</float></doc><doc><str name="id">39</str><float 
> name="number_p_f">8.4332075</float></doc><doc><str name="id">40</str><float 
> name="number_p_f">7.276645</float></doc><doc><str name="id">41</str><float 
> name="number_p_f">1.8072826</float></doc><doc><str name="id">42</str><float 
> name="number_p_f">0.50658286</float></doc><doc><str name="id">43</str><float 
> name="number_p_f">4.957859</float></doc></result>
>    [junit4]    > </response>
>    [junit4]    >        request was:q=*:*&fl=id,+number_p_f&rows=44&wt=xml
>    [junit4]    >        at 
> org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:875)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to