You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@accumulo.apache.org by Josh Elser <jo...@gmail.com> on 2015/06/16 05:05:46 UTC

Can no longer run ITs on command line like before

Trying to look into a failing test for Eric, and I see that the 
following no longer runs the test:

`mvn clean package -Dtest=CyclicReplicationIT -DfailIfNoTests=false`

Looks like this is because the maven-surefire-plugin configuration 
doesn't have the same testSourcesDirectory configuration that failsafe does.

While I understand that it's not "the most correct way to invoke ITs", I 
think this is an impediment for devs (especially with all of the other 
cruft tied into the verify lifecycle phase).

Is there a reason this doesn't wasn't done?

Re: Can no longer run ITs on command line like before

Posted by Christopher <ct...@apache.org>.
Yeah, I typically skip those too, when I run a single test. Personally, I
don't find it that bad, because I understand which flags I want to set to
skip specific things, but I can understand how this might be frustrating to
somebody else.

FWIW, you can get similar functionality with surefire, but you'd have to
specify -DtestSourceDirectory='${project.basedir}/src/main/java'
-DtestClassesDirectory='${project.build.directory}/classes' so surefire can
find the tests. Failsafe already has this configuration set, so it's
probably just easier to use failsafe to execute ITs, and surefire to
execute unit tests. That's how they are designed to work, after all.

On Tue, Jun 16, 2015, 01:06 Josh Elser <jo...@gmail.com> wrote:

> And, for argument's sake, the actual command I have to run to get the
> old functionality is worse than you wrote:
>
> mvn clean verify -Dit.test=CyclicReplicationIT -DfailIfNoTests=false
> -Dcheckstyle.skip -Dfindbugs.skip -Dtest=skipall
>
> Josh Elser wrote:
> > No typo, and this is exactly what I meant to defeat by saying "the most
> > correct way to invoke ITs".
> >
> > We could previously run ITs via surefire without issue and this is now
> > broken. As I said, I understand this is not "how it should be done", but
> > I would imagine the strong majority of devs understand "mvn test
> > -Dtest=MyTest" and not that they suddenly have to do something different.
> >
> > Christopher wrote:
> >> Not sure if this was a typo, or the problem, but you're trying to run
> >> an IT with the surefire plugin, rather than the failsafe plugin. This
> >> is incorrect. Your command should be:
> >>
> >> `mvn clean verify -Dtest=skipall -Dit.test=CyclicReplicationIT
> >> -DfailIfNoTests=false`
> >>
> >> This will cause the surefire plugin to be a noop (because "skipall"
> >> doesn't match anything), and the failsafe plugin will work as
> >> expected, executing the test in question.
> >>
> >> --
> >> Christopher L Tubbs II
> >> http://gravatar.com/ctubbsii
> >>
> >>
> >> On Mon, Jun 15, 2015 at 11:05 PM, Josh Elser<jo...@gmail.com>
> wrote:
> >>> Trying to look into a failing test for Eric, and I see that the
> >>> following no
> >>> longer runs the test:
> >>>
> >>> `mvn clean package -Dtest=CyclicReplicationIT -DfailIfNoTests=false`
> >>>
> >>> Looks like this is because the maven-surefire-plugin configuration
> >>> doesn't
> >>> have the same testSourcesDirectory configuration that failsafe does.
> >>>
> >>> While I understand that it's not "the most correct way to invoke ITs",
> I
> >>> think this is an impediment for devs (especially with all of the
> >>> other cruft
> >>> tied into the verify lifecycle phase).
> >>>
> >>> Is there a reason this doesn't wasn't done?
>

Re: Can no longer run ITs on command line like before

Posted by Josh Elser <jo...@gmail.com>.
And, for argument's sake, the actual command I have to run to get the 
old functionality is worse than you wrote:

mvn clean verify -Dit.test=CyclicReplicationIT -DfailIfNoTests=false 
-Dcheckstyle.skip -Dfindbugs.skip -Dtest=skipall

Josh Elser wrote:
> No typo, and this is exactly what I meant to defeat by saying "the most
> correct way to invoke ITs".
>
> We could previously run ITs via surefire without issue and this is now
> broken. As I said, I understand this is not "how it should be done", but
> I would imagine the strong majority of devs understand "mvn test
> -Dtest=MyTest" and not that they suddenly have to do something different.
>
> Christopher wrote:
>> Not sure if this was a typo, or the problem, but you're trying to run
>> an IT with the surefire plugin, rather than the failsafe plugin. This
>> is incorrect. Your command should be:
>>
>> `mvn clean verify -Dtest=skipall -Dit.test=CyclicReplicationIT
>> -DfailIfNoTests=false`
>>
>> This will cause the surefire plugin to be a noop (because "skipall"
>> doesn't match anything), and the failsafe plugin will work as
>> expected, executing the test in question.
>>
>> --
>> Christopher L Tubbs II
>> http://gravatar.com/ctubbsii
>>
>>
>> On Mon, Jun 15, 2015 at 11:05 PM, Josh Elser<jo...@gmail.com> wrote:
>>> Trying to look into a failing test for Eric, and I see that the
>>> following no
>>> longer runs the test:
>>>
>>> `mvn clean package -Dtest=CyclicReplicationIT -DfailIfNoTests=false`
>>>
>>> Looks like this is because the maven-surefire-plugin configuration
>>> doesn't
>>> have the same testSourcesDirectory configuration that failsafe does.
>>>
>>> While I understand that it's not "the most correct way to invoke ITs", I
>>> think this is an impediment for devs (especially with all of the
>>> other cruft
>>> tied into the verify lifecycle phase).
>>>
>>> Is there a reason this doesn't wasn't done?

Re: Can no longer run ITs on command line like before

Posted by Josh Elser <jo...@gmail.com>.
No typo, and this is exactly what I meant to defeat by saying "the most 
correct way to invoke ITs".

We could previously run ITs via surefire without issue and this is now 
broken. As I said, I understand this is not "how it should be done", but 
I would imagine the strong majority of devs understand "mvn test 
-Dtest=MyTest" and not that they suddenly have to do something different.

Christopher wrote:
> Not sure if this was a typo, or the problem, but you're trying to run
> an IT with the surefire plugin, rather than the failsafe plugin. This
> is incorrect. Your command should be:
>
> `mvn clean verify -Dtest=skipall -Dit.test=CyclicReplicationIT
> -DfailIfNoTests=false`
>
> This will cause the surefire plugin to be a noop (because "skipall"
> doesn't match anything), and the failsafe plugin will work as
> expected, executing the test in question.
>
> --
> Christopher L Tubbs II
> http://gravatar.com/ctubbsii
>
>
> On Mon, Jun 15, 2015 at 11:05 PM, Josh Elser<jo...@gmail.com>  wrote:
>> Trying to look into a failing test for Eric, and I see that the following no
>> longer runs the test:
>>
>> `mvn clean package -Dtest=CyclicReplicationIT -DfailIfNoTests=false`
>>
>> Looks like this is because the maven-surefire-plugin configuration doesn't
>> have the same testSourcesDirectory configuration that failsafe does.
>>
>> While I understand that it's not "the most correct way to invoke ITs", I
>> think this is an impediment for devs (especially with all of the other cruft
>> tied into the verify lifecycle phase).
>>
>> Is there a reason this doesn't wasn't done?

Re: Can no longer run ITs on command line like before

Posted by Christopher <ct...@apache.org>.
Not sure if this was a typo, or the problem, but you're trying to run
an IT with the surefire plugin, rather than the failsafe plugin. This
is incorrect. Your command should be:

`mvn clean verify -Dtest=skipall -Dit.test=CyclicReplicationIT
-DfailIfNoTests=false`

This will cause the surefire plugin to be a noop (because "skipall"
doesn't match anything), and the failsafe plugin will work as
expected, executing the test in question.

--
Christopher L Tubbs II
http://gravatar.com/ctubbsii


On Mon, Jun 15, 2015 at 11:05 PM, Josh Elser <jo...@gmail.com> wrote:
> Trying to look into a failing test for Eric, and I see that the following no
> longer runs the test:
>
> `mvn clean package -Dtest=CyclicReplicationIT -DfailIfNoTests=false`
>
> Looks like this is because the maven-surefire-plugin configuration doesn't
> have the same testSourcesDirectory configuration that failsafe does.
>
> While I understand that it's not "the most correct way to invoke ITs", I
> think this is an impediment for devs (especially with all of the other cruft
> tied into the verify lifecycle phase).
>
> Is there a reason this doesn't wasn't done?