Solr
  1. Solr
  2. SOLR-3112

after running 'ant test' solr/solrj/src/test-files/solrj/solr/shared/test-solr.xml is leftover

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None

      Description

      This is especially confusing, as then it looks like you dont have a clean checkout.

      For now it should be under svn:ignore, but ultimately we really should not be creating files under src/test-files

      1. SOLR-3112.patch
        17 kB
        Luca Cavanna

        Activity

        Hide
        Luca Cavanna added a comment -

        Looks like the test which leaves the test-solr.xml there is TestEmbeddedSolrServer. I'm working on fixing it.

        Show
        Luca Cavanna added a comment - Looks like the test which leaves the test-solr.xml there is TestEmbeddedSolrServer. I'm working on fixing it.
        Hide
        Robert Muir added a comment -

        Thanks for taking a look Luca!
        I was unable to fix this with my first shot on SOLR-3268... I'm guessing really the test just needs to be fixed.

        Show
        Robert Muir added a comment - Thanks for taking a look Luca! I was unable to fix this with my first shot on SOLR-3268 ... I'm guessing really the test just needs to be fixed.
        Hide
        Luca Cavanna added a comment -

        I noticed that TestSolrProperties and TestEmbeddedSolrServer were really similar. They both worked on the test-files folder, but the last one cleaned everything at the end, while the second one not.
        I created a base class to avoid copy pasting the same code, then I changed both to work on a temp directory, without modifying anything on the test-files folder.

        Regarding the other elevate-data-distrib.xml problem mentioned in the SOLR-3268, I had a look at it. It seems to copy the core/src/test-files/solr/conf/elevate.xml to same path but different filename (elevate-data-distrib.xml) right before testing. Then the test uses the new file and doesn't clean it at the end. Well, I wonder why the test makes that copy. Maybe I didn't get something, but rather than cleaning at the end, my patch removes that copy and the test seems to work anyway. Let me know if there's a better fix for this!

        Show
        Luca Cavanna added a comment - I noticed that TestSolrProperties and TestEmbeddedSolrServer were really similar. They both worked on the test-files folder, but the last one cleaned everything at the end, while the second one not. I created a base class to avoid copy pasting the same code, then I changed both to work on a temp directory, without modifying anything on the test-files folder. Regarding the other elevate-data-distrib.xml problem mentioned in the SOLR-3268 , I had a look at it. It seems to copy the core/src/test-files/solr/conf/elevate.xml to same path but different filename (elevate-data-distrib.xml) right before testing. Then the test uses the new file and doesn't clean it at the end. Well, I wonder why the test makes that copy. Maybe I didn't get something, but rather than cleaning at the end, my patch removes that copy and the test seems to work anyway. Let me know if there's a better fix for this!
        Hide
        Robert Muir added a comment -

        Wow, thanks Luca for fixing these test issues! I just committed this.

        Show
        Robert Muir added a comment - Wow, thanks Luca for fixing these test issues! I just committed this.
        Hide
        Uwe Schindler added a comment -

        Thanks!

        One thing: we should now be able to remove the extra <delete/> and the extra comment on "ant clean" in solr's build.xml?

        Show
        Uwe Schindler added a comment - Thanks! One thing: we should now be able to remove the extra <delete/> and the extra comment on "ant clean" in solr's build.xml?

          People

          • Assignee:
            Unassigned
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development