lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Smiley (Commented) (JIRA)" <>
Subject [jira] [Commented] (SOLR-3048) Fix incorrect test classpath order under the Maven build
Date Thu, 19 Jan 2012 06:10:41 GMT


David Smiley commented on SOLR-3048:

Wow; that must have been an adventure to figure out.
> Fix incorrect test classpath order under the Maven build
> --------------------------------------------------------
>                 Key: SOLR-3048
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 4.0
>            Reporter: Steven Rowe
>            Assignee: Steven Rowe
>             Fix For: 4.0
>         Attachments: SOLR-3048.patch
> The {{lucene-test-framework}} test dependency must appear before {{lucene-core}} in the
test classpath, to allow test-only read/write {{PreFlexRWCodec}} to fulfill Lucene3x codec
requests instead of lucene-core's read-only {{Lucene3xCodec}}.
> SOLR-2849 refactored Solr dependencies and pulled the {{lucene-test-framework}} test
dependency into the {{solr-parent}} POM, and all Solr child POMs inherit that dependency.
 When a Solr child module e.g. {{solr-core}} runs tests under Maven, it orders the {{solr-parent}}
dependencies *after* its own dependencies (see [MNG-3494|]),
and so {{lucene-test-framework}} will always appear after {{lucene-core}} if it is declared
in the {{solr-parent}} POM.  (I searched the interweb for a mechanism to influence this ordering,
and came up empty-handed...)
> Under LUCENE-3490 I [committed a fix to the {{lucene/}} and {{modules/}} POMs|],
but not to any of Solr's POMs - I'm not sure why I excluded Solr at that point :(.
> This misconfiguration triggered a [test failure|]
today in the Lucene-Solr-Maven-trunk Jenkins build for {{org.apache.solr.core.TestArbitraryIndexDir.testLoadNewIndexDir}}:
> {noformat}
> CheckIndex failed
> Segments file=segments_1 numSegments=1 version=4.0 format=FORMAT_4_0 [Lucene 4.0]
>   1 of 1: name=_0 docCount=1
>     codec=Lucene3x
>     compound=false
>     WARNING: fixIndex() would remove reference to this segment; full exception:
> org.apache.lucene.index.IndexFormatTooNewException: Format version is not supported (resource:
-2147483648 (needs to be between -2 and -3)
> 	at
> ...
> NOTE: reproduce with: ant test -Dtestcase=TestArbitraryIndexDir -Dtestmethod=testLoadNewIndexDir
-Dtests.seed=2035db5097855cfe:-1d64b1ca3d5e4ac9:4163b1b8d4ca3ca0 -Dargs="-Dfile.encoding=ISO8859-1"
> {noformat}
> I was able to reproduce locally using the following cmdline from {{solr/core/}}:
> {noformat}
> mvn test -Dtest=TestArbitraryIndexDir -Dtests.seed=2035db5097855cfe:-1d64b1ca3d5e4ac9:4163b1b8d4ca3ca0
> {noformat}
> The fix is to move the {{lucene-test-framework}} dependency declaration out of the {{solr-parent}}
POM and back into each of the Solr child POMs under which tests are run.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message