lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-5764) Fix recently added tests to *not* use absolute paths to load resources, use SolrTestCaseJ4.getFile() and getResource() instead; fix morphlines/map-reduce to not duplicate test resources and fix dependencies among them
Date Sat, 22 Feb 2014 21:19:19 GMT

    [ https://issues.apache.org/jira/browse/SOLR-5764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13909542#comment-13909542
] 

Uwe Schindler commented on SOLR-5764:
-------------------------------------

[~steve_rowe]: I added a hack into the maven poms. The dependnecy does not seem to include
the shared test-files folder, which is provided by solr-morphlines-core. solr-morphlines-cell
and solr-map-reduce fail to lookup the resource. Maybe you can fix this by including the test-files
folder to the test artifact.

> Fix recently added tests to *not* use absolute paths to load resources, use SolrTestCaseJ4.getFile()
and getResource() instead; fix morphlines/map-reduce to not duplicate test resources and fix
dependencies among them
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-5764
>                 URL: https://issues.apache.org/jira/browse/SOLR-5764
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 4.7
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 4.8, 5.0
>
>         Attachments: SOLR-5764.patch
>
>
> Tests that were recently added have the problems that some of them were using {{ExternalPaths.SOURCE_HOME}}
and adding the absolute location of modules. This makes it impossible to move modules around
or run them standalone.
> This issue fixes those tests to use {{SolrTestCaseJ4.getFile()}} or a simple openResourceAsStream
from classpath, because all {{test-files}} are located in classpath. {{ExternalPaths.SOURCE_HOME}}
will be hidden (private) so nothing can use it anymore - so no new tests should appear using
them again.
> While doing this, I recognized that the recently added morphlines and mapreduce contribs
are duplicating modified solr example folders into their test-files folder, while morphlines-core
was referring from inside the tests to map-reduce/test-files (ignoring the whole megabytes
of test-files of morphlines!!! Easy to see, because the config files in it were just broken
and referring to non-existent classes). This is the reverse of the natural dependency, where
map-reduce uses morphlines as dep.
> The fix here is to completely delete/empty the test-files folders of map-reduce and morphlines-cell
and let those reuse the one from morphlines-core. Morphlines-core is now the only source folder
for test-files, shared by all three contribs. Its contents are now the previous map-reduce/test-files
folder.
> I will provide a patch with the code changes, but the cleanup of morphlines test-files
cannot be described here, it is too crazy. I will just heavy commit the changes, sorry!



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message