Solr
  1. Solr
  2. SOLR-7999

SolrRequestParserTest#testStreamURL started failing

    Details

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

      Description

      It looks like the html that is pulled back has a changing mirror link inserted into it. Not a fan of a test that hits the internet like this...

      1. SOLR-7999.patch
        5 kB
        Uwe Schindler
      2. SOLR-7999.patch
        3 kB
        Uwe Schindler
      3. SOLR-7999.patch
        3 kB
        Uwe Schindler

        Activity

        Hide
        ASF subversion and git services added a comment -

        Commit 1700592 from Mark Miller in branch 'dev/trunk'
        [ https://svn.apache.org/r1700592 ]

        SOLR-7999: SolrRequetParserTest#testStreamURL started failing.

        Show
        ASF subversion and git services added a comment - Commit 1700592 from Mark Miller in branch 'dev/trunk' [ https://svn.apache.org/r1700592 ] SOLR-7999 : SolrRequetParserTest#testStreamURL started failing.
        Hide
        ASF subversion and git services added a comment -

        Commit 1700597 from Mark Miller in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1700597 ]

        SOLR-7999: SolrRequetParserTest#testStreamURL started failing.

        Show
        ASF subversion and git services added a comment - Commit 1700597 from Mark Miller in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1700597 ] SOLR-7999 : SolrRequetParserTest#testStreamURL started failing.
        Hide
        Uwe Schindler added a comment -

        I agree, we should remove the test completely or make it use a local jetty.

        Show
        Uwe Schindler added a comment - I agree, we should remove the test completely or make it use a local jetty.
        Hide
        Uwe Schindler added a comment -

        Another idea is to just use a file: URL. The test does not depend on HTTP at all. We can simply get the file from a test resource and use toURI().toURL(). I can change this a bit later! I was about to fix this test then I have seen this issue.

        Show
        Uwe Schindler added a comment - Another idea is to just use a file: URL. The test does not depend on HTTP at all. We can simply get the file from a test resource and use toURI().toURL(). I can change this a bit later! I was about to fix this test then I have seen this issue.
        Hide
        Uwe Schindler added a comment -

        Here is a simple patch using the README file in test-resources.

        I changed SolrQueryRequest to implement Autocloseable, if this is not wanted, I can change the test to not use try-with-resources.

        Any comments?

        Show
        Uwe Schindler added a comment - Here is a simple patch using the README file in test-resources. I changed SolrQueryRequest to implement Autocloseable, if this is not wanted, I can change the test to not use try-with-resources. Any comments?
        Hide
        Uwe Schindler added a comment -

        More simplified.

        Show
        Uwe Schindler added a comment - More simplified.
        Hide
        Uwe Schindler added a comment -

        I changed SolrQueryRequest to implement Autocloseable

        All classes implementing this are already closeable, so this was just missing. I will commit the fix tomorrow.

        Show
        Uwe Schindler added a comment - I changed SolrQueryRequest to implement Autocloseable All classes implementing this are already closeable, so this was just missing. I will commit the fix tomorrow.
        Hide
        Uwe Schindler added a comment -

        Final patch.

        I also added a missing test for "stream.file" common param (similar to "stream.url"). I just did this because I recognized that this was missing.

        Show
        Uwe Schindler added a comment - Final patch. I also added a missing test for "stream.file" common param (similar to "stream.url"). I just did this because I recognized that this was missing.
        Hide
        Mark Miller added a comment -

        +1, thanks Uwe!

        Show
        Mark Miller added a comment - +1, thanks Uwe!
        Hide
        ASF subversion and git services added a comment -

        Commit 1700706 from Uwe Schindler in branch 'dev/trunk'
        [ https://svn.apache.org/r1700706 ]

        SOLR-7999: SolrRequestParser tests no longer depend on external URLs that may fail to work

        Show
        ASF subversion and git services added a comment - Commit 1700706 from Uwe Schindler in branch 'dev/trunk' [ https://svn.apache.org/r1700706 ] SOLR-7999 : SolrRequestParser tests no longer depend on external URLs that may fail to work
        Hide
        ASF subversion and git services added a comment -

        Commit 1700707 from Uwe Schindler in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1700707 ]

        Merged revision(s) 1700706 from lucene/dev/trunk:
        SOLR-7999: SolrRequestParser tests no longer depend on external URLs that may fail to work

        Show
        ASF subversion and git services added a comment - Commit 1700707 from Uwe Schindler in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1700707 ] Merged revision(s) 1700706 from lucene/dev/trunk: SOLR-7999 : SolrRequestParser tests no longer depend on external URLs that may fail to work

          People

          • Assignee:
            Uwe Schindler
            Reporter:
            Mark Miller
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development