Solr
  1. Solr
  2. SOLR-2061

Generate jar containing test classes.

    Details

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

      Description

      Follow-on to LUCENE-2609 for the solr build – it would be useful to generate and deploy a jar contaiing the test classes so other projects could write unit tests using the framework in Solr.

      This may take care of SOLR-717 as well.

      1. SOLR-2061.patch
        1 kB
        Drew Farris
      2. SOLR-2061.patch
        1 kB
        Drew Farris
      3. SOLR-2061.patch
        33 kB
        Robert Muir
      4. SOLR-2061.patch
        50 kB
        Steve Rowe
      5. SOLR-2061.patch
        47 kB
        Steve Rowe
      6. SOLR-2061.patch
        54 kB
        Steve Rowe

        Issue Links

          Activity

          Hide
          Robert Muir added a comment -

          Bulk close for 3.2

          Show
          Robert Muir added a comment - Bulk close for 3.2
          Hide
          Ingo Renner added a comment -

          Hi Steven,

          well that sounds fair enough. I just saw a 3.1.1 target and from the open issues for 3.2 it seemed still a bit away. So I'm fine with 3.2 if it's that close anyway

          Thanks!

          Show
          Ingo Renner added a comment - Hi Steven, well that sounds fair enough. I just saw a 3.1.1 target and from the open issues for 3.2 it seemed still a bit away. So I'm fine with 3.2 if it's that close anyway Thanks!
          Hide
          Steve Rowe added a comment -

          Hi Ingo,

          Can we have the jar for 3.1.1, too please?

          It's very unlikely that there will ever be a 3.1.1 release. 3.2.0, which has this jar, will be released very soon, most likely in less than a week.

          Show
          Steve Rowe added a comment - Hi Ingo, Can we have the jar for 3.1.1, too please? It's very unlikely that there will ever be a 3.1.1 release. 3.2.0, which has this jar, will be released very soon, most likely in less than a week.
          Hide
          Ingo Renner added a comment -

          Can we have the jar for 3.1.1, too please?

          Show
          Ingo Renner added a comment - Can we have the jar for 3.1.1, too please?
          Hide
          Steve Rowe added a comment - - edited

          Committed:

          • trunk: r1087722, r1087723, r1087834
          • branch_3x: r1087833
          Show
          Steve Rowe added a comment - - edited Committed: trunk: r1087722, r1087723, r1087834 branch_3x: r1087833
          Hide
          Steve Rowe added a comment -

          This patch includes a new "Test Framework Javadoc" link from the Solr website's index.html.

          Committing shortly.

          Show
          Steve Rowe added a comment - This patch includes a new "Test Framework Javadoc" link from the Solr website's index.html. Committing shortly.
          Hide
          Steve Rowe added a comment -

          This patch brings the Maven aspects up to snuff.

          All tests pass under Ant and Maven. generate-maven-artifacts generates the test-frameword jars, and they are signed by sign-artifacts.

          Unless there are objections, I'll commit this tomorrow, then backport to branch_3x.

          Show
          Steve Rowe added a comment - This patch brings the Maven aspects up to snuff. All tests pass under Ant and Maven. generate-maven-artifacts generates the test-frameword jars, and they are signed by sign-artifacts . Unless there are objections, I'll commit this tomorrow, then backport to branch_3x.
          Hide
          Robert Muir added a comment -

          I think this issue just needs the maven parts to be resynced to the fact that lucene's tests-framework jar was renamed?

          Show
          Robert Muir added a comment - I think this issue just needs the maven parts to be resynced to the fact that lucene's tests-framework jar was renamed?
          Hide
          Robert Muir added a comment -

          Thanks Steven, though one thing i screwed up here (or lucene is screwed up, dont know which), is the name of the jar file.

          i named this one apache-solr-test-framework-4.0-SNAPSHOT.jar, but the lucene one is named oddly: lucene-core-4.0-SNAPSHOT-tests.jar.

          I think its a bit confusing for the tests-framework to be named -tests in the lucene case... but either way we should at least be consistent here because to use the solr test framework, you need the lucene one too (it extends it)

          Show
          Robert Muir added a comment - Thanks Steven, though one thing i screwed up here (or lucene is screwed up, dont know which), is the name of the jar file. i named this one apache-solr-test-framework-4.0-SNAPSHOT.jar, but the lucene one is named oddly: lucene-core-4.0-SNAPSHOT-tests.jar. I think its a bit confusing for the tests-framework to be named -tests in the lucene case... but either way we should at least be consistent here because to use the solr test framework, you need the lucene one too (it extends it)
          Hide
          Steve Rowe added a comment -

          This version of the patch includes all of Robert's, and adds in Maven and IntelliJ support.

          The Solr test-framework binary, source, and javadoc jars are produced by ant generate-maven-artifacts and signed, along with their .pom file, by ant sign-artifacts.

          The Maven build works through the install phase, including the test phase, switching all modules to depend on the new Solr test framework jar instead of the jar produced from all Solr test sources.

          The IntelliJ build works, and all modules' test suites run and succeed.

          Show
          Steve Rowe added a comment - This version of the patch includes all of Robert's, and adds in Maven and IntelliJ support. The Solr test-framework binary, source, and javadoc jars are produced by ant generate-maven-artifacts and signed, along with their .pom file, by ant sign-artifacts . The Maven build works through the install phase, including the test phase, switching all modules to depend on the new Solr test framework jar instead of the jar produced from all Solr test sources. The IntelliJ build works, and all modules' test suites run and succeed.
          Hide
          Robert Muir added a comment -

          attached is a patch that makes a test-framework like lucene's.

          The solr contribs now only depend on this, not all the concrete tests.

          This makes it easy for someone developing a plugin to put schema.xml/etc in their test classpath, extend SolrTestCaseJ4, etc.

          Before applying the patch, please do this:

          svn mkdir solr/src/test-framework
          svn mv --parents solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java solr/src/test-framework/org/apache/solr/BaseDistributedSearchTestCase.java
          svn mv --parents solr/src/test/org/apache/solr/JSONTestUtil.java solr/src/test-framework/org/apache/solr/JSONTestUtil.java
          svn mv --parents solr/src/test/org/apache/solr/SolrTestCaseJ4.java solr/src/test-framework/org/apache/solr/SolrTestCaseJ4.java
          svn mv --parents solr/src/test/org/apache/solr/analysis/BaseTokenTestCase.java solr/src/test-framework/org/apache/solr/analysis/BaseTokenTestCase.java
          svn mv --parents solr/src/test/org/apache/solr/util/AbstractSolrTestCase.java solr/src/test-framework/org/apache/solr/util/AbstractSolrTestCase.java
          svn mv --parents solr/src/java/org/apache/solr/util/TestHarness.java solr/src/test-framework/org/apache/solr/util/TestHarness.java
          
          Show
          Robert Muir added a comment - attached is a patch that makes a test-framework like lucene's. The solr contribs now only depend on this, not all the concrete tests. This makes it easy for someone developing a plugin to put schema.xml/etc in their test classpath, extend SolrTestCaseJ4, etc. Before applying the patch, please do this: svn mkdir solr/src/test-framework svn mv --parents solr/src/test/org/apache/solr/BaseDistributedSearchTestCase.java solr/src/test-framework/org/apache/solr/BaseDistributedSearchTestCase.java svn mv --parents solr/src/test/org/apache/solr/JSONTestUtil.java solr/src/test-framework/org/apache/solr/JSONTestUtil.java svn mv --parents solr/src/test/org/apache/solr/SolrTestCaseJ4.java solr/src/test-framework/org/apache/solr/SolrTestCaseJ4.java svn mv --parents solr/src/test/org/apache/solr/analysis/BaseTokenTestCase.java solr/src/test-framework/org/apache/solr/analysis/BaseTokenTestCase.java svn mv --parents solr/src/test/org/apache/solr/util/AbstractSolrTestCase.java solr/src/test-framework/org/apache/solr/util/AbstractSolrTestCase.java svn mv --parents solr/src/java/org/apache/solr/util/TestHarness.java solr/src/test-framework/org/apache/solr/util/TestHarness.java
          Hide
          Drew Farris added a comment -

          Updated patch for latest rev

          Show
          Drew Farris added a comment - Updated patch for latest rev
          Hide
          Drew Farris added a comment -

          Here's the patch.

          Show
          Drew Farris added a comment - Here's the patch.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development