You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Anshum Gupta (JIRA)" <ji...@apache.org> on 2016/03/04 22:01:40 UTC
[jira] [Created] (SOLR-8789) CollectionAPISolrJTests is not run
when running ant test
Anshum Gupta created SOLR-8789:
----------------------------------
Summary: CollectionAPISolrJTests is not run when running ant test
Key: SOLR-8789
URL: https://issues.apache.org/jira/browse/SOLR-8789
Project: Solr
Issue Type: Bug
Reporter: Anshum Gupta
The pattern that is used to run the tests on Jenkins (ant test) is (from lucene/common-build.xml) :
{code}
<include name="**/Test*.class" />
<include name="**/*Test.class" />
{code}
CollectionAPISolrJTests ends in an extra 's' and so is not executed. We need to either fix the pattern or the test name to make sure that this test is run.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: [jira] [Created] (SOLR-8789) CollectionAPISolrJTests is not run
when running ant test
Posted by Anshum Gupta <an...@anshumgupta.net>.
Yes, we need a precommit test there and some documentation. A developer
could end up adding tests that do not even conform to a more wide *test*
and even if we skip abstract classes, only half the problem is taken care
of. Instead, we should
* document that *Test.class and Test*.class are acceptable test class names.
* add a pre-commit check to make sure that tests are implemented in classes
that confirm to the above pattern (at this point, I have no idea about how
to do that but I can look it up). The developer shouldn't commit an
abstract class that matches either of the above pattern as it would always
lead to failed 'ant test', which I assume all of us run before we commit.
Thoughts?
On Fri, Mar 4, 2016 at 6:53 PM, Erick Erickson <er...@gmail.com>
wrote:
> Seems trappy to not allow BlahTests.class though. What about some kind of
> precommit test? I can imagine some rules about naming of abstract classes
> to avoid running them. But that's hacky too; if I name an abstract class
> AbstractBlahTest, wouldn't it get run with the current rules?
>
> Erick
> On Mar 5, 2016 14:15, "Shawn Heisey" <ap...@elyograg.org> wrote:
>
>> On 3/4/2016 4:28 PM, Erick Erickson wrote:
>> >
>> > Oh my! Can't look now, but if I'm not missing something, I'd vote for
>> > changing the pattern to include *Tests...
>> >
>>
>> I discovered that there's an abstract class in SolrJ named
>> "SolrExampleTests" that fails with the new pattern added. It fails
>> because it's abstract. I did not check whether there were any classes
>> elsewhere in the codebase that would fit this pattern -- I was playing
>> around in SolrJ.
>>
>> Anshum did commit a pattern change, but after I discovered the above
>> problem, opted to rename the test instead of changing the patterns.
>>
>> Thanks,
>> Shawn
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>>
>>
--
Anshum Gupta
Re: [jira] [Created] (SOLR-8789) CollectionAPISolrJTests is not run
when running ant test
Posted by Erick Erickson <er...@gmail.com>.
Seems trappy to not allow BlahTests.class though. What about some kind of
precommit test? I can imagine some rules about naming of abstract classes
to avoid running them. But that's hacky too; if I name an abstract class
AbstractBlahTest, wouldn't it get run with the current rules?
Erick
On Mar 5, 2016 14:15, "Shawn Heisey" <ap...@elyograg.org> wrote:
> On 3/4/2016 4:28 PM, Erick Erickson wrote:
> >
> > Oh my! Can't look now, but if I'm not missing something, I'd vote for
> > changing the pattern to include *Tests...
> >
>
> I discovered that there's an abstract class in SolrJ named
> "SolrExampleTests" that fails with the new pattern added. It fails
> because it's abstract. I did not check whether there were any classes
> elsewhere in the codebase that would fit this pattern -- I was playing
> around in SolrJ.
>
> Anshum did commit a pattern change, but after I discovered the above
> problem, opted to rename the test instead of changing the patterns.
>
> Thanks,
> Shawn
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>
Re: [jira] [Created] (SOLR-8789) CollectionAPISolrJTests is not run
when running ant test
Posted by Shawn Heisey <ap...@elyograg.org>.
On 3/4/2016 4:28 PM, Erick Erickson wrote:
>
> Oh my! Can't look now, but if I'm not missing something, I'd vote for
> changing the pattern to include *Tests...
>
I discovered that there's an abstract class in SolrJ named
"SolrExampleTests" that fails with the new pattern added. It fails
because it's abstract. I did not check whether there were any classes
elsewhere in the codebase that would fit this pattern -- I was playing
around in SolrJ.
Anshum did commit a pattern change, but after I discovered the above
problem, opted to rename the test instead of changing the patterns.
Thanks,
Shawn
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: [jira] [Created] (SOLR-8789) CollectionAPISolrJTests is not run
when running ant test
Posted by Erick Erickson <er...@gmail.com>.
Oh my! Can't look now, but if I'm not missing something, I'd vote for
changing the pattern to include *Tests...
Erick
On Mar 5, 2016 10:01, "Anshum Gupta (JIRA)" <ji...@apache.org> wrote:
> Anshum Gupta created SOLR-8789:
> ----------------------------------
>
> Summary: CollectionAPISolrJTests is not run when running ant
> test
> Key: SOLR-8789
> URL: https://issues.apache.org/jira/browse/SOLR-8789
> Project: Solr
> Issue Type: Bug
> Reporter: Anshum Gupta
>
>
> The pattern that is used to run the tests on Jenkins (ant test) is (from
> lucene/common-build.xml) :
> {code}
> <include name="**/Test*.class" />
> <include name="**/*Test.class" />
> {code}
>
> CollectionAPISolrJTests ends in an extra 's' and so is not executed. We
> need to either fix the pattern or the test name to make sure that this test
> is run.
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.3.4#6332)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>