Solr
  1. Solr
  2. SOLR-8388

TestSolrQueryResponse (factor out, then extend)

    Details

    • Type: Test Test
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      factor out solr/core/src/test/org/apache/solr/response/TestSolrQueryResponse.java from solr/core/src/test/org/apache/solr/servlet/ResponseHeaderTest.java and then extend it

      1. SOLR-8388-part1of2.patch
        11 kB
        Christine Poerschke
      2. SOLR-8388-part2of2.patch
        7 kB
        Christine Poerschke
      3. SOLR-8388-part3of2.patch
        2 kB
        Christine Poerschke

        Issue Links

          Activity

          Hide
          ASF subversion and git services added a comment -

          Commit 1719116 from Christine Poerschke in branch 'dev/trunk'
          [ https://svn.apache.org/r1719116 ]

          SOLR-8388: factor out response/TestSolrQueryResponse.java from servlet/ResponseHeaderTest.java

          Show
          ASF subversion and git services added a comment - Commit 1719116 from Christine Poerschke in branch 'dev/trunk' [ https://svn.apache.org/r1719116 ] SOLR-8388 : factor out response/TestSolrQueryResponse.java from servlet/ResponseHeaderTest.java
          Hide
          ASF subversion and git services added a comment -

          Commit 1719184 from Christine Poerschke in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1719184 ]

          SOLR-8388: factor out response/TestSolrQueryResponse.java from servlet/ResponseHeaderTest.java (merge in revision 1719116 from trunk)

          Show
          ASF subversion and git services added a comment - Commit 1719184 from Christine Poerschke in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1719184 ] SOLR-8388 : factor out response/TestSolrQueryResponse.java from servlet/ResponseHeaderTest.java (merge in revision 1719116 from trunk)
          Hide
          Christine Poerschke added a comment -

          additions:

          • TestSolrQueryResponse.testName
          • TestSolrQueryResponse.testValues
          • TestSolrQueryResponse.testReturnFields
          • TestSolrQueryResponse.testException
          • TestSolrQueryResponse.testHttpCaching

          also:

          • SolrReturnFields.toString method
          • ReturnFieldsTest.testToString test
          Show
          Christine Poerschke added a comment - additions: TestSolrQueryResponse.testName TestSolrQueryResponse.testValues TestSolrQueryResponse.testReturnFields TestSolrQueryResponse.testException TestSolrQueryResponse.testHttpCaching also: SolrReturnFields.toString method ReturnFieldsTest.testToString test
          Hide
          ASF subversion and git services added a comment -

          Commit 1720160 from Christine Poerschke in branch 'dev/trunk'
          [ https://svn.apache.org/r1720160 ]

          SOLR-8388: more TestSolrQueryResponse.java tests; add SolrReturnFields.toString method, ReturnFieldsTest.testToString test;

          Show
          ASF subversion and git services added a comment - Commit 1720160 from Christine Poerschke in branch 'dev/trunk' [ https://svn.apache.org/r1720160 ] SOLR-8388 : more TestSolrQueryResponse.java tests; add SolrReturnFields.toString method, ReturnFieldsTest.testToString test;
          Hide
          ASF subversion and git services added a comment -

          Commit 1720180 from Christine Poerschke in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1720180 ]

          SOLR-8388: more TestSolrQueryResponse.java tests; add SolrReturnFields.toString method, ReturnFieldsTest.testToString test; (merge in revision 1720160 from trunk)

          Show
          ASF subversion and git services added a comment - Commit 1720180 from Christine Poerschke in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1720180 ] SOLR-8388 : more TestSolrQueryResponse.java tests; add SolrReturnFields.toString method, ReturnFieldsTest.testToString test; (merge in revision 1720160 from trunk)
          Hide
          Steve Rowe added a comment -

          My Jenkins found a reproducible ReturnsFieldsTest.testToString failure (Linux, Oracle Java7, branch_5x):

            [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=ReturnFieldsTest -Dtests.method=testToString -Dtests.seed=4E6AE8A4D715B23B -Dtests.slow=true -Dtests.linedocsfile=/home/jenkins/lucene-data/enwiki.random.lines.txt -Dtests.locale=sk -Dtests.timezone=Europe/Brussels -Dtests.asserts=true -Dtests.file.encoding=US-ASCII
             [junit4] FAILURE 0.04s | ReturnFieldsTest.testToString <<<
             [junit4]    > Throwable #1: org.junit.ComparisonFailure: expected:<...s=(globs=[],fields=[[score, test, id],okFieldNames=[null, score, test], id],reqFieldNames=...> but was:<...s=(globs=[],fields=[[test, score, id],okFieldNames=[null, test, score], id],reqFieldNames=...>
             [junit4]    >        at __randomizedtesting.SeedInfo.seed([4E6AE8A4D715B23B:9F4B5FA5E80FDF93]:0)
             [junit4]    >        at org.apache.solr.search.ReturnFieldsTest.testToString(ReturnFieldsTest.java:109)
          
          Show
          Steve Rowe added a comment - My Jenkins found a reproducible ReturnsFieldsTest.testToString failure (Linux, Oracle Java7, branch_5x): [junit4] 2> NOTE: reproduce with: ant test -Dtestcase=ReturnFieldsTest -Dtests.method=testToString -Dtests.seed=4E6AE8A4D715B23B -Dtests.slow=true -Dtests.linedocsfile=/home/jenkins/lucene-data/enwiki.random.lines.txt -Dtests.locale=sk -Dtests.timezone=Europe/Brussels -Dtests.asserts=true -Dtests.file.encoding=US-ASCII [junit4] FAILURE 0.04s | ReturnFieldsTest.testToString <<< [junit4] > Throwable #1: org.junit.ComparisonFailure: expected:<...s=(globs=[],fields=[[score, test, id],okFieldNames=[null, score, test], id],reqFieldNames=...> but was:<...s=(globs=[],fields=[[test, score, id],okFieldNames=[null, test, score], id],reqFieldNames=...> [junit4] > at __randomizedtesting.SeedInfo.seed([4E6AE8A4D715B23B:9F4B5FA5E80FDF93]:0) [junit4] > at org.apache.solr.search.ReturnFieldsTest.testToString(ReturnFieldsTest.java:109)
          Hide
          Christine Poerschke added a comment -

          Thanks Steve. Looking into.

          Show
          Christine Poerschke added a comment - Thanks Steve. Looking into.
          Hide
          Christine Poerschke added a comment -

          fix the ReturnFieldsTest.testToString test added by part2of2 (the stringified fields include sets and the test incorrectly assumed a particular ordering for the sets' values)

          Show
          Christine Poerschke added a comment - fix the ReturnFieldsTest.testToString test added by part2of2 (the stringified fields include sets and the test incorrectly assumed a particular ordering for the sets' values)
          Hide
          ASF subversion and git services added a comment -

          Commit 1720253 from Christine Poerschke in branch 'dev/trunk'
          [ https://svn.apache.org/r1720253 ]

          SOLR-8388: ReturnFieldsTest.testToString() fix (don't assume ordering within sets' values)

          Show
          ASF subversion and git services added a comment - Commit 1720253 from Christine Poerschke in branch 'dev/trunk' [ https://svn.apache.org/r1720253 ] SOLR-8388 : ReturnFieldsTest.testToString() fix (don't assume ordering within sets' values)
          Hide
          ASF subversion and git services added a comment -

          Commit 1720257 from Christine Poerschke in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1720257 ]

          SOLR-8388: ReturnFieldsTest.testToString() fix (don't assume ordering within sets' values) (merge in revision 1720253 from trunk)

          Show
          ASF subversion and git services added a comment - Commit 1720257 from Christine Poerschke in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1720257 ] SOLR-8388 : ReturnFieldsTest.testToString() fix (don't assume ordering within sets' values) (merge in revision 1720253 from trunk)
          Hide
          Christine Poerschke added a comment -

          Thanks for sharing the reproducible test failure above. It wasn't reproducible for me but the commit below should fix it nonetheless. Also I have created SOLR-8425 to replace TestSolrQueryResponse.testReturnFields's SolrReturnFields.toString use since that also might hit a similar set value ordering difference.

          Show
          Christine Poerschke added a comment - Thanks for sharing the reproducible test failure above. It wasn't reproducible for me but the commit below should fix it nonetheless. Also I have created SOLR-8425 to replace TestSolrQueryResponse.testReturnFields 's SolrReturnFields.toString use since that also might hit a similar set value ordering difference.
          Hide
          Steve Rowe added a comment -

          Thanks for sharing the reproducible test failure above. It wasn't reproducible for me but the commit below should fix it nonetheless.

          Thanks for fixing, I haven't seen any failures since your fix.

          Show
          Steve Rowe added a comment - Thanks for sharing the reproducible test failure above. It wasn't reproducible for me but the commit below should fix it nonetheless. Thanks for fixing, I haven't seen any failures since your fix.

            People

            • Assignee:
              Christine Poerschke
              Reporter:
              Christine Poerschke
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development