Solr
  1. Solr
  2. SOLR-6048

Fix asserts for SolrDocument, SolrInputDocument and SolrInputField in SolrTestCaseJ4

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9, Trunk
    • Component/s: None
    • Labels:
      None

      Description

      SOLR-5265 added these asserts to check equality of SolrDocument, SolrInputDocument and SolrInputField instead of adding a compare method to any of these classes.

      But these are actually compare methods. So we should rename them to compareSolrDocument() etc. and in TestJavaBinCodec fix the usage. Currently in TestJavaBinCodec the backcompat test is broken.

      1. SOLR-6048.patch
        8 kB
        Varun Thacker
      2. SOLR-6048.patch
        2 kB
        Varun Thacker
      3. SOLR-6048.patch
        3 kB
        Varun Thacker

        Issue Links

          Activity

          Hide
          ASF subversion and git services added a comment -

          Commit 1602139 from Noble Paul in branch 'dev/branches/branch_4x'
          [ https://svn.apache.org/r1602139 ]

          SOLR-6048 the assert was not really failing the test

          Show
          ASF subversion and git services added a comment - Commit 1602139 from Noble Paul in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1602139 ] SOLR-6048 the assert was not really failing the test
          Hide
          ASF subversion and git services added a comment -

          Commit 1602138 from Noble Paul in branch 'dev/trunk'
          [ https://svn.apache.org/r1602138 ]

          SOLR-6048 the assert was not really failing the test

          Show
          ASF subversion and git services added a comment - Commit 1602138 from Noble Paul in branch 'dev/trunk' [ https://svn.apache.org/r1602138 ] SOLR-6048 the assert was not really failing the test
          Hide
          Varun Thacker added a comment -

          Fixes the typo in the test - SolrDocumentList instanceof check was wrong calling assertSolrDocumentEquals instead of assertSolrDocumentListEquals

          Show
          Varun Thacker added a comment - Fixes the typo in the test - SolrDocumentList instanceof check was wrong calling assertSolrDocumentEquals instead of assertSolrDocumentListEquals
          Hide
          Varun Thacker added a comment -

          Patch which only corrects the testBackCompat() test and doesn't rename the methods.

          Show
          Varun Thacker added a comment - Patch which only corrects the testBackCompat() test and doesn't rename the methods.
          Hide
          Varun Thacker added a comment -

          I changed the method names and fixed TestJavaBinCodec.testBackCompat() which was not checking SolrDocument, SolrInputDocument and SolrInputField correctly.

          Show
          Varun Thacker added a comment - I changed the method names and fixed TestJavaBinCodec.testBackCompat() which was not checking SolrDocument, SolrInputDocument and SolrInputField correctly.
          Hide
          Noble Paul added a comment -

          is it just a method name change ?

          Show
          Noble Paul added a comment - is it just a method name change ?
          Hide
          Varun Thacker added a comment -

          Simple patch

          Show
          Varun Thacker added a comment - Simple patch

            People

            • Assignee:
              Noble Paul
              Reporter:
              Varun Thacker
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development