You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by P Williams <wi...@gmail.com> on 2013/01/18 23:48:03 UTC
Re: SolrTestCaseJ4: Can't avoid "collection1" convention
Hi folks,
I think that there is still an issue after the SOLR-3826 patch was applied
for 4.0 [https://issues.apache.org/jira/browse/SOLR-3826] in September
2012. This line is missing:
Index: solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
===================================================================
--- solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
(revision 1435375)
+++ solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
(working copy)
@@ -384,9 +384,9 @@
public static void createCore() {
assertNotNull(testSolrHome);
solrConfig = TestHarness.createConfig(testSolrHome, coreName,
getSolrConfigFile());
- h = new TestHarness( dataDir.getAbsolutePath(),
+ h = new TestHarness( coreName, new Initializer( coreName,
dataDir.getAbsolutePath(),
solrConfig,
- getSchemaFile());
+ getSchemaFile() ) );
lrf = h.getRequestFactory
("standard",0,20,CommonParams.VERSION,"2.2");
}
TestHarness( String dataDirectory,SolrConfig solrConfig, IndexSchema
indexSchema) sets coreName to null and opens the default core: collection1.
I would expect that coreName is carried all the way through the test.
What's the best course of action for getting this fixed? Should I re-open
SOLR-3826 or create a new issue?
Thanks,
Tricia
On Tue, Aug 14, 2012 at 12:32 PM, Smiley, David W. <ds...@mitre.org>wrote:
> I've got some code that extends Solr and I use the Solr test framework for
> my tests. I upgraded from Solr 4 alpha to Solr 4 beta today, and it
> appears I am forced to put my test solr home directory in solr/collection1
> rather than just plain solr/ (relative to my test classpath). I looked
> through the code and found that SolrTestCaseJ4.initCore() calls
> createCore() which calls TestHarness.createConfig(solrHome,confFile) which
> adds the "collection1" to solr home. This is a minor issue, but it annoys
> me and I see it as a needless change. If it isn't fixed, we'll have to at
> least put that in the release notes and definitely the javadoc so that it
> is clear you *have* to use collection1.
>
> ~ David
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>
Re: SolrTestCaseJ4: Can't avoid "collection1" convention
Posted by P Williams <wi...@gmail.com>.
Done. You can find it here: https://issues.apache.org/jira/browse/SOLR-4317
On Fri, Jan 18, 2013 at 4:01 PM, Mark Miller <ma...@gmail.com> wrote:
> I'd suggest creating a new issue and referencing the old issue in it.
>
> - Mark
>
> On Jan 18, 2013, at 5:48 PM, P Williams <wi...@gmail.com>
> wrote:
>
> > Hi folks,
> >
> > I think that there is still an issue after the SOLR-3826 patch was
> applied for 4.0 [https://issues.apache.org/jira/browse/SOLR-3826] in
> September 2012. This line is missing:
> >
> > Index: solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
> > ===================================================================
> > --- solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
> (revision 1435375)
> > +++ solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
> (working copy)
> > @@ -384,9 +384,9 @@
> > public static void createCore() {
> > assertNotNull(testSolrHome);
> > solrConfig = TestHarness.createConfig(testSolrHome, coreName,
> getSolrConfigFile());
> > - h = new TestHarness( dataDir.getAbsolutePath(),
> > + h = new TestHarness( coreName, new Initializer( coreName,
> dataDir.getAbsolutePath(),
> > solrConfig,
> > - getSchemaFile());
> > + getSchemaFile() ) );
> > lrf = h.getRequestFactory
> > ("standard",0,20,CommonParams.VERSION,"2.2");
> > }
> >
> >
> > TestHarness( String dataDirectory,SolrConfig solrConfig, IndexSchema
> indexSchema) sets coreName to null and opens the default core: collection1.
> I would expect that coreName is carried all the way through the test.
> >
> > What's the best course of action for getting this fixed? Should I
> re-open SOLR-3826 or create a new issue?
> >
> > Thanks,
> > Tricia
> >
> > On Tue, Aug 14, 2012 at 12:32 PM, Smiley, David W. <ds...@mitre.org>
> wrote:
> > I've got some code that extends Solr and I use the Solr test framework
> for my tests. I upgraded from Solr 4 alpha to Solr 4 beta today, and it
> appears I am forced to put my test solr home directory in solr/collection1
> rather than just plain solr/ (relative to my test classpath). I looked
> through the code and found that SolrTestCaseJ4.initCore() calls
> createCore() which calls TestHarness.createConfig(solrHome,confFile) which
> adds the "collection1" to solr home. This is a minor issue, but it annoys
> me and I see it as a needless change. If it isn't fixed, we'll have to at
> least put that in the release notes and definitely the javadoc so that it
> is clear you *have* to use collection1.
> >
> > ~ David
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: dev-help@lucene.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>
Re: SolrTestCaseJ4: Can't avoid "collection1" convention
Posted by Mark Miller <ma...@gmail.com>.
I'd suggest creating a new issue and referencing the old issue in it.
- Mark
On Jan 18, 2013, at 5:48 PM, P Williams <wi...@gmail.com> wrote:
> Hi folks,
>
> I think that there is still an issue after the SOLR-3826 patch was applied for 4.0 [https://issues.apache.org/jira/browse/SOLR-3826] in September 2012. This line is missing:
>
> Index: solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
> ===================================================================
> --- solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java (revision 1435375)
> +++ solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java (working copy)
> @@ -384,9 +384,9 @@
> public static void createCore() {
> assertNotNull(testSolrHome);
> solrConfig = TestHarness.createConfig(testSolrHome, coreName, getSolrConfigFile());
> - h = new TestHarness( dataDir.getAbsolutePath(),
> + h = new TestHarness( coreName, new Initializer( coreName, dataDir.getAbsolutePath(),
> solrConfig,
> - getSchemaFile());
> + getSchemaFile() ) );
> lrf = h.getRequestFactory
> ("standard",0,20,CommonParams.VERSION,"2.2");
> }
>
>
> TestHarness( String dataDirectory,SolrConfig solrConfig, IndexSchema indexSchema) sets coreName to null and opens the default core: collection1. I would expect that coreName is carried all the way through the test.
>
> What's the best course of action for getting this fixed? Should I re-open SOLR-3826 or create a new issue?
>
> Thanks,
> Tricia
>
> On Tue, Aug 14, 2012 at 12:32 PM, Smiley, David W. <ds...@mitre.org> wrote:
> I've got some code that extends Solr and I use the Solr test framework for my tests. I upgraded from Solr 4 alpha to Solr 4 beta today, and it appears I am forced to put my test solr home directory in solr/collection1 rather than just plain solr/ (relative to my test classpath). I looked through the code and found that SolrTestCaseJ4.initCore() calls createCore() which calls TestHarness.createConfig(solrHome,confFile) which adds the "collection1" to solr home. This is a minor issue, but it annoys me and I see it as a needless change. If it isn't fixed, we'll have to at least put that in the release notes and definitely the javadoc so that it is clear you *have* to use collection1.
>
> ~ David
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org