[ https://issues.apache.org/jira/browse/NUTCH-896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12912974#action_12912974 ]
Sertan Alkan commented on NUTCH-896: ------------------------------------ I am not quite sure why we choose to hide {{setProperties}} method in {{o.g.s.DataStoreFactory}} but instead of setting properties hard-coded in {{AbstractNutchTest}}, I guess we could one of the following; * We can place a different gora.properties file in src/test which includes these hard coded settings and let this one be used by test classes. This will require a slight change on GORA side as currently DataStoreFactory doesn't have a selection mechanism for the resource to read properties from (though, that will a minor change in GORA). The problem with this is that currently every subclass of {{AbstractNutchTest}} uses its own database by setting a different _jdbc.url_. Is there a specific reason why every subclass needs a different database? * We could create different properties file for each implementing test case and put these under src/test. This will again require the same change in GORA mentioned above. * OR, we can create a different configuration file containing these settings, and add this file to the {{Configuration}} object. At some point, we're again going to need to import these settings into DataStoreFactory possibly via changing the visibility of {{setProperties}} method. I am leaning towards the first but any comments on the track are welcome. > Gora-based tests need to have their own config files > ----------------------------------------------------- > > Key: NUTCH-896 > URL: https://issues.apache.org/jira/browse/NUTCH-896 > Project: Nutch > Issue Type: Bug > Affects Versions: 2.0 > Reporter: Julien Nioche > Assignee: Julien Nioche > Fix For: 2.0 > > > The tests extending AbstractNutchTest (Injector, Generator, Fetcher) have > hard-coded properties for GORA. It would be better to be able to rely on a > file gora.properties used only for the tests, just as we do with the > nutch-*.xml config files (see CrawlTestUtil). This way we wouldn't use the > configs set in the main /conf file as they could be specific to a given GORA > backend e.g. Mysql vs hsqldb. This would also help running the tests with a > non-default GORA backend. > We need to modify GORA and make the method DataStoreFactory.setProperties > public. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.