Solr
  1. Solr
  2. SOLR-2659

src/test-files/** should be moved under src/test-files/<module-name>/** for all Solr modules except core

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.4, 4.0-ALPHA
    • Fix Version/s: 3.4, 4.0-ALPHA
    • Component/s: Build
    • Labels:
      None

      Description

      SOLR-2452 split the solrj & common tests and test-files out from under solr/src/test{,-files} and placed them under solr/solrj/.

      Because IntelliJ's dependency scheme can't directly support the dependencies among the core/, solrj/, and test-framework/ internal modules, IntelliJ runs core/ and solrj/ tests under the monolithic IntelliJ "solr" module,

      As a result, when IntelliJ copies core/src/test-files/** and solrj/src/test-files/** to solr/build/solr-idea/classes/test/ (the test output directory), only one file from each same-named file pair can reside in the target directory, e.g. solr/conf/schema.xml. When same-named files differ between the two test-files/ directories, tests will fail. E.g.: LUCENE-2048 introduced a nopositions fieldType and a nopositionstext field into core/src/test-files/solr/conf/schema.xml, but not into the same-named file under solrj/src/test-files/, so when IntelliJ chooses the solrj version when copying resources, the core test that depends on the nopositionstext field (TestOmitPositions) will fail.

      I propose adding an extra directory level under solrj/src/test-files/: solrj/src/test-files/solrj/. That way, files from core/src/test-files/ can have the same names, but still co-exist when copied to the test output directory by IntelliJ.

      To maintain consistency, as well as avoid future naming conflicts, all other solr modules except core should switch to the same layout: src/test-files/<module-name>/*. Currently all contribs' solr homes are named src/test-files/solr-<module-name>/ - these directories should be renamed to src/test-files/<module-name>/solr.

      1. SOLR-2659.part2.patch
        2 kB
        Steve Rowe
      2. SOLR-2659.patch
        30 kB
        Steve Rowe
      3. SOLR-2659.patch
        9 kB
        Steve Rowe
      4. SOLR-2659.svn.movement.sh
        1 kB
        Steve Rowe

        Activity

        Steve Rowe created issue -
        Steve Rowe made changes -
        Field Original Value New Value
        Attachment SOLR-2659.patch [ 12486770 ]
        Steve Rowe made changes -
        Summary IntelliJ resource copying of solrj/src/test-files/** and core/src/test-files/** to build output directory has to choose between/overwrite same-named files src/test-files/** should be moved under src/test-files/<module-name>/** for all Solr modules except core
        Description SOLR-2452 split the solrj & common tests and test-files out from under {{solr/src/test\{,-files\}}} and placed them under {{solr/solrj/}}.

        Because IntelliJ's dependency scheme can't directly support the dependencies among the {{core/}}, {{solrj/}}, and {{test-framework/}} internal modules, IntelliJ runs {{core/}} and {{solrj/}} tests under the monolithic IntelliJ "solr" module,

        As a result, when IntelliJ copies {{core/src/test-files/\*\*}} and {{solrj/src/test-files/\*\*}} to {{solr/build/solr-idea/classes/test/}} (the test output directory), only one file from each same-named file pair can reside in the target directory, e.g. {{solr/conf/schema.xml}}. When same-named files differ between the two {{test-files/}} directories, tests will fail. E.g.: LUCENE-2048 introduced a {{nopositions}} fieldType and a {{nopositionstext}} field into {{core/src/test-files/solr/conf/schema.xml}}, but not into the same-named file under {{solrj/src/test-files/}}, so when IntelliJ chooses the solrj version when copying resources, the core test that depends on the {{nopositionstext}} field ({{TestOmitPositions}}) will fail.

        I propose adding an extra directory level under {{solrj/src/test-files/}}: {{solrj/src/test-files/solrj/}}. That way, files from {{core/src/test-files/}} can have the same names, but still co-exist when copied to the test output directory by IntelliJ.
        SOLR-2452 split the solrj & common tests and test-files out from under {{solr/src/test\{,-files\}}} and placed them under {{solr/solrj/}}.

        Because IntelliJ's dependency scheme can't directly support the dependencies among the {{core/}}, {{solrj/}}, and {{test-framework/}} internal modules, IntelliJ runs {{core/}} and {{solrj/}} tests under the monolithic IntelliJ "solr" module,

        As a result, when IntelliJ copies {{core/src/test-files/\*\*}} and {{solrj/src/test-files/\*\*}} to {{solr/build/solr-idea/classes/test/}} (the test output directory), only one file from each same-named file pair can reside in the target directory, e.g. {{solr/conf/schema.xml}}. When same-named files differ between the two {{test-files/}} directories, tests will fail. E.g.: LUCENE-2048 introduced a {{nopositions}} fieldType and a {{nopositionstext}} field into {{core/src/test-files/solr/conf/schema.xml}}, but not into the same-named file under {{solrj/src/test-files/}}, so when IntelliJ chooses the solrj version when copying resources, the core test that depends on the {{nopositionstext}} field ({{TestOmitPositions}}) will fail.

        I propose adding an extra directory level under {{solrj/src/test-files/}}: {{solrj/src/test-files/solrj/}}. That way, files from {{core/src/test-files/}} can have the same names, but still co-exist when copied to the test output directory by IntelliJ.

        To maintain consistency, as well as avoid future naming conflicts, all other solr modules except core should switch to the same layout: {{src/test-files/<module-name>/\*}}. Currently all contribs' solr homes are named {{src/test-files/solr-<module-name>/}} - these directories should be renamed to {{src/test-files/<module-name>/solr}}.
        Steve Rowe made changes -
        Attachment SOLR-2659.patch [ 12487405 ]
        Attachment SOLR-2659.svn.movement.sh [ 12487406 ]
        Steve Rowe made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 3.4 [ 12316683 ]
        Fix Version/s 4.0 [ 12314992 ]
        Resolution Fixed [ 1 ]
        Steve Rowe made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Steve Rowe made changes -
        Attachment SOLR-2659.part2.patch [ 12487461 ]
        Steve Rowe made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Robert Muir made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Steve Rowe
            Reporter:
            Steve Rowe
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development