Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-4849

Fix test failure due to not substituting in system properties

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.3, 6.0
    • Fix Version/s: 4.4, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      When we look at old-style solr.xml files, we try to test whether more than one core points to the same data dir. When constructing the paths, we need to substitute in any system-defined properties.

      This happens to work fine on a Mac (and unix in general?) but results in an illegal file name exception on Windows machines.

      1. SOLR-4849.patch
        3 kB
        Erick Erickson
      2. SOLR-4849.patch
        3 kB
        Erick Erickson
      3. SOLR-4849.patch
        4 kB
        Erick Erickson
      4. 4849-testoutput.txt
        33 kB
        Shawn Heisey

        Issue Links

          Activity

          Hide
          steve_rowe Steve Rowe added a comment -

          Bulk close resolved 4.4 issues

          Show
          steve_rowe Steve Rowe added a comment - Bulk close resolved 4.4 issues
          Hide
          erickerickson Erick Erickson added a comment -

          trunk: r-1485403
          4x: r-1485436

          Thanks for testing Shawn!

          Show
          erickerickson Erick Erickson added a comment - trunk: r-1485403 4x: r-1485436 Thanks for testing Shawn!
          Hide
          commit-tag-bot Commit Tag Bot added a comment -

          [branch_4x commit] erick
          http://svn.apache.org/viewvc?view=revision&revision=1485436

          fix for SOLR-4849. Tests failing on Windows boxes

          Show
          commit-tag-bot Commit Tag Bot added a comment - [branch_4x commit] erick http://svn.apache.org/viewvc?view=revision&revision=1485436 fix for SOLR-4849 . Tests failing on Windows boxes
          Hide
          commit-tag-bot Commit Tag Bot added a comment -

          [trunk commit] erick
          http://svn.apache.org/viewvc?view=revision&revision=1485403

          SOLR-4849, test failures due to windows pathing issues

          Show
          commit-tag-bot Commit Tag Bot added a comment - [trunk commit] erick http://svn.apache.org/viewvc?view=revision&revision=1485403 SOLR-4849 , test failures due to windows pathing issues
          Hide
          erickerickson Erick Erickson added a comment -

          Many thanks, Shawn. I'll take out the nocommit and commit it this evening.

          Show
          erickerickson Erick Erickson added a comment - Many thanks, Shawn. I'll take out the nocommit and commit it this evening.
          Hide
          elyograg Shawn Heisey added a comment -

          I think you've nailed it this time. The patch passes for me on both Linux and Windows, did two runs on each.

          Show
          elyograg Shawn Heisey added a comment - I think you've nailed it this time. The patch passes for me on both Linux and Windows, did two runs on each.
          Hide
          erickerickson Erick Erickson added a comment -

          One more time. If this doesn't work I'll bite the bullet and download a Windows VM to work with....

          Thanks,
          Erick

          Show
          erickerickson Erick Erickson added a comment - One more time. If this doesn't work I'll bite the bullet and download a Windows VM to work with.... Thanks, Erick
          Hide
          elyograg Shawn Heisey added a comment -

          Attached is the test output. It's got MSDOS crlf line endings.

          This is on a Windows 7 system with Java 1.7u17, the runs from last night were on a Windows 8 system with 1.7u21.

          Show
          elyograg Shawn Heisey added a comment - Attached is the test output. It's got MSDOS crlf line endings. This is on a Windows 7 system with Java 1.7u17, the runs from last night were on a Windows 8 system with 1.7u21.
          Hide
          steve_rowe Steve Rowe added a comment -

          BTW, in case you missed it (it took me quite a while to stumble over it) you can run the individual test suite by

          ant -Dtestcase=TestEmbeddedSolrServer test

          Right, and you can also run only the tests under solrj by first changing the current directory to the solrj directory: cd solr/solrj ; ant test. This works for all Lucene/Solr modules.

          Show
          steve_rowe Steve Rowe added a comment - BTW, in case you missed it (it took me quite a while to stumble over it) you can run the individual test suite by ant -Dtestcase=TestEmbeddedSolrServer test Right, and you can also run only the tests under solrj by first changing the current directory to the solrj directory: cd solr/solrj ; ant test . This works for all Lucene/Solr modules.
          Hide
          erickerickson Erick Erickson added a comment -

          Shawn:

          Thanks for testing, this is puzzling. If I may presume on your good nature, could try the new patch and send me the output? It's the same as the old, just prints out the offending data.

          BTW, in case you missed it (it took me quite a while to stumble over it) you can run the individual test suite by

          ant -Dtestcase=TestEmbeddedSolrServer test

          and an individual method in that file by

          ant -Dtestcase=TestEmbeddedSolrServer -Dtests.method=testShutdown test

          and skip all the confusion...

          Thanks,
          Erick

          Show
          erickerickson Erick Erickson added a comment - Shawn: Thanks for testing, this is puzzling. If I may presume on your good nature, could try the new patch and send me the output? It's the same as the old, just prints out the offending data. BTW, in case you missed it (it took me quite a while to stumble over it) you can run the individual test suite by ant -Dtestcase=TestEmbeddedSolrServer test and an individual method in that file by ant -Dtestcase=TestEmbeddedSolrServer -Dtests.method=testShutdown test and skip all the confusion... Thanks, Erick
          Hide
          elyograg Shawn Heisey added a comment -

          The confusion is now cleared up, it's definitely time for bed.

          The cloud test failure happened in solr/core, which meant that the other tests never even got run, because they are in solr/solrj. On the next run, all core tests passed and the solrj tests once again failed.

          Show
          elyograg Shawn Heisey added a comment - The confusion is now cleared up, it's definitely time for bed. The cloud test failure happened in solr/core, which meant that the other tests never even got run, because they are in solr/solrj. On the next run, all core tests passed and the solrj tests once again failed.
          Hide
          elyograg Shawn Heisey added a comment -

          I ran the test again after 'svn up' (which just added Robert's commit on LUCENE-4992) and now those tests are all good, I got a completely different failure:

          [junit4:junit4] Tests with failures:
          [junit4:junit4] - org.apache.solr.cloud.ChaosMonkeyShardSplitTest.testDistribSearch

          I can't explain this. I will do some additional runs.

          Show
          elyograg Shawn Heisey added a comment - I ran the test again after 'svn up' (which just added Robert's commit on LUCENE-4992 ) and now those tests are all good, I got a completely different failure: [junit4:junit4] Tests with failures: [junit4:junit4] - org.apache.solr.cloud.ChaosMonkeyShardSplitTest.testDistribSearch I can't explain this. I will do some additional runs.
          Hide
          elyograg Shawn Heisey added a comment -

          Tests still fail on Windows, patch applied to branch_4x.

          [junit4:junit4] Tests with failures:
          [junit4:junit4]   - org.apache.solr.client.solrj.request.TestCoreAdmin.testCustomUlogDir
          [junit4:junit4]   - org.apache.solr.client.solrj.embedded.TestEmbeddedSolrServer.testGetCoreContainer
          [junit4:junit4]   - org.apache.solr.client.solrj.request.TestCoreAdmin.testErrorCases
          [junit4:junit4]   - org.apache.solr.client.solrj.embedded.TestEmbeddedSolrServer.testShutdown
          [junit4:junit4]   - org.apache.solr.client.solrj.embedded.TestSolrProperties.testProperties
          
          [junit4:junit4]   2> NOTE: Windows 8 6.2 amd64/Oracle Corporation 1.7.0_21 (64-bit)/cpus=4,threads=1,free=254383696,total=306380800
          
          Show
          elyograg Shawn Heisey added a comment - Tests still fail on Windows, patch applied to branch_4x. [junit4:junit4] Tests with failures: [junit4:junit4] - org.apache.solr.client.solrj.request.TestCoreAdmin.testCustomUlogDir [junit4:junit4] - org.apache.solr.client.solrj.embedded.TestEmbeddedSolrServer.testGetCoreContainer [junit4:junit4] - org.apache.solr.client.solrj.request.TestCoreAdmin.testErrorCases [junit4:junit4] - org.apache.solr.client.solrj.embedded.TestEmbeddedSolrServer.testShutdown [junit4:junit4] - org.apache.solr.client.solrj.embedded.TestSolrProperties.testProperties [junit4:junit4] 2> NOTE: Windows 8 6.2 amd64/Oracle Corporation 1.7.0_21 (64-bit)/cpus=4,threads=1,free=254383696,total=306380800
          Hide
          erickerickson Erick Erickson added a comment -

          All tests pass, so if nobody has the time/inclination I'll just check it in in the morning.

          Show
          erickerickson Erick Erickson added a comment - All tests pass, so if nobody has the time/inclination I'll just check it in in the morning.
          Hide
          erickerickson Erick Erickson added a comment - - edited

          Chris Hostetter (Unused) Yep, since I just attached the patch here, I'll close 4810 and point it here. Thanks.

          I was wondering how it got magically linked....

          Show
          erickerickson Erick Erickson added a comment - - edited Chris Hostetter (Unused) Yep, since I just attached the patch here, I'll close 4810 and point it here. Thanks. I was wondering how it got magically linked....
          Hide
          erickerickson Erick Erickson added a comment -

          Can some kind soul on a Windows machine try this patch (made on 4x)? These tests should fail first time, every time w/o this patch on a Windows box:

          org.apache.solr.client.solrj.request.TestCoreAdmin.testCustomUlogDir

          org.apache.solr.client.solrj.request.TestCoreAdmin.testErrorCases

          org.apache.solr.client.solrj.embedded.TestSolrProperties.testProperties

          with:
          Caused by: java.io.IOException: The filename, directory name, or volume label syntax is incorrect

          And should this be back-ported to 4.3.1?

          Show
          erickerickson Erick Erickson added a comment - Can some kind soul on a Windows machine try this patch (made on 4x)? These tests should fail first time, every time w/o this patch on a Windows box: org.apache.solr.client.solrj.request.TestCoreAdmin.testCustomUlogDir org.apache.solr.client.solrj.request.TestCoreAdmin.testErrorCases org.apache.solr.client.solrj.embedded.TestSolrProperties.testProperties with: Caused by: java.io.IOException: The filename, directory name, or volume label syntax is incorrect And should this be back-ported to 4.3.1?
          Hide
          hossman Hoss Man added a comment -

          Erick: dup of SOLR-4810 ?

          Show
          hossman Hoss Man added a comment - Erick: dup of SOLR-4810 ?

            People

            • Assignee:
              erickerickson Erick Erickson
              Reporter:
              erickerickson Erick Erickson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development