[
https://issues.apache.org/jira/browse/SOLR-10023?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Steve Rowe updated SOLR-10023:
------------------------------
Attachment: SOLR-10023-add-test-only-target.patch
Attaching patch that adds a non-recursive {{test-only}} target, works for me,
including running single tests (with {{-Dtestcase=...}}) or all tests.
If you run {{ant test-only}} without first running {{ant compile-test}}, then
you'll get an error like:
{noformat}
BUILD FAILED
/Users/sarowe/git/lucene-solr-6/lucene/common-build.xml:1448: The following
error occurred while executing this line:
/Users/sarowe/git/lucene-solr-6/lucene/common-build.xml:985:
/Users/sarowe/git/lucene-solr-6/lucene/build/core/classes/test does not exist.
{noformat}
Running {{ant compile-test test-only}} will always avoid the above error, but
is almost what {{ant test}} does, and so will operate at the same (slow) speed.
If you run {{ant test-only}} from a non-module directory with a {{build.xml}}
file (currently {{lucene/}}, {{solr/}}, and {{lucene/analysis/}}), you'll get
an error like:
{noformat}
BUILD FAILED
/Users/sarowe/git/lucene-solr-6/lucene/build.xml:60: Target 'test-only' will
not run recursively. First change directory to the module you want to test.
{noformat}
I think it's ready to go. Should we do this?
> Improve single unit test run time with ant.
> -------------------------------------------
>
> Key: SOLR-10023
> URL: https://issues.apache.org/jira/browse/SOLR-10023
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Components: Tests
> Reporter: Mark Miller
> Attachments: SOLR-10023-add-test-only-target.patch, stdout.tar.gz
>
>
> It seems to take 2 minutes and 45 seconds to run a single test with the
> latest build design and the test itself is only 4 seconds. I've noticed this
> for a long time, and it seems because ant is running through a billion
> targets first.
> I haven't checked yet, so maybe it's a Solr specific issue? I'll check with
> Lucene and move this issue if necessary.
> There is hopefully something we can do to improve this though. At least we
> should try and get some sharp minds to take first / second look. If I did not
> use an IDE so much to run tests, this would drive me nuts.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]