You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Elliotte Rusty Harold <el...@ibiblio.org> on 2022/04/07 11:12:56 UTC

Possible surefire bug in -Dsurefire.failIfNoSpecifiedTests=false

I'm still debugging our local project, but my team seems to be
experiencing a problem where surefire fails projects without tests
even though -Dsurefire.failIfNoSpecifiedTests=false is set. This
happened suspiciously close in time to the recent 3.0.0-M6 release and
our upgrade to the same.

I'm by no means certain this is a surefire bug yet, but I wanted to
throw up an early flag to find out if anyone else has seen this in
case it is a regression in M6 that needs to be patched.

-- 
Elliotte Rusty Harold
elharo@ibiblio.org

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


Re: Possible surefire bug in -Dsurefire.failIfNoSpecifiedTests=false

Posted by Romain Manni-Bucau <rm...@gmail.com>.
I guess the reason is "intent", failIfNoTests=false if some module doesnt
have any test but failIfNoSpecifiedTests=true if you asked to execute a
test which was not found....but agree surefire config is a bit complex
upfront.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le jeu. 7 avr. 2022 à 13:47, Elliotte Rusty Harold <el...@ibiblio.org> a
écrit :

> OK, looks like the problem is on our end, though the separation
> between -DfailIfNoTests and -DfailIfNoSpecifiedTests is strange and
> confusing. I don't see why both are needed. failIfNoTests seems to be
> a superset of failIfNoSpecifiedTests
>
> On Thu, Apr 7, 2022 at 11:33 AM Romain Manni-Bucau
> <rm...@gmail.com> wrote:
> >
> > It is there since v2.something IIRC, did you check with -X it was really
> > set to false?
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <https://rmannibucau.metawerx.net/> | Old Blog
> > <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > <
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >
> >
> >
> > Le jeu. 7 avr. 2022 à 13:28, Elliotte Rusty Harold <el...@ibiblio.org>
> a
> > écrit :
> >
> > > On Thu, Apr 7, 2022 at 11:16 AM Romain Manni-Bucau
> > > <rm...@gmail.com> wrote:
> > > >
> > > > Hi Elliotte,
> > > >
> > > > Did you mean -DfailIfNoTests=false? the NoSpecified is for the case
> you
> > > > specify a test (-Dtest) IIRC.
> > > >
> > >
> > > No, the error message we see (and didn't see a couple of days ago) is:
> > >
> > > Failed to execute goal
> > > org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M6:test
> > > (default-cli) on project protobuf-bom: No tests matching pattern
> > > "**/*Test, !**/*IsValidUtf8Test, !**/*DecodeUtf8Test" were executed!
> > > (Set -Dsurefire.failIfNoSpecifiedTests=false to ignore this error.) ->
> > > [Help 1]
> > >
> > > However that is helpful. Now that I look, our command is setting
> > > -DfailIfNoTests=false. It is not setting
> > > -Dsurefire.failIfNoSpecifiedTests=false. I didn't initially catch the
> > > difference because they were separated by many pages of log junk. is
> > > failIfNoSpecifiedTests new in M6? Or is there some other reason this
> > > might trigger now?
> > >
> > >
> > >
> > >
> > > --
> > > Elliotte Rusty Harold
> > > elharo@ibiblio.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: dev-help@maven.apache.org
> > >
> > >
>
>
>
> --
> Elliotte Rusty Harold
> elharo@ibiblio.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Possible surefire bug in -Dsurefire.failIfNoSpecifiedTests=false

Posted by Elliotte Rusty Harold <el...@ibiblio.org>.
OK, looks like the problem is on our end, though the separation
between -DfailIfNoTests and -DfailIfNoSpecifiedTests is strange and
confusing. I don't see why both are needed. failIfNoTests seems to be
a superset of failIfNoSpecifiedTests

On Thu, Apr 7, 2022 at 11:33 AM Romain Manni-Bucau
<rm...@gmail.com> wrote:
>
> It is there since v2.something IIRC, did you check with -X it was really
> set to false?
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> <https://www.packtpub.com/application-development/java-ee-8-high-performance>
>
>
> Le jeu. 7 avr. 2022 à 13:28, Elliotte Rusty Harold <el...@ibiblio.org> a
> écrit :
>
> > On Thu, Apr 7, 2022 at 11:16 AM Romain Manni-Bucau
> > <rm...@gmail.com> wrote:
> > >
> > > Hi Elliotte,
> > >
> > > Did you mean -DfailIfNoTests=false? the NoSpecified is for the case you
> > > specify a test (-Dtest) IIRC.
> > >
> >
> > No, the error message we see (and didn't see a couple of days ago) is:
> >
> > Failed to execute goal
> > org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M6:test
> > (default-cli) on project protobuf-bom: No tests matching pattern
> > "**/*Test, !**/*IsValidUtf8Test, !**/*DecodeUtf8Test" were executed!
> > (Set -Dsurefire.failIfNoSpecifiedTests=false to ignore this error.) ->
> > [Help 1]
> >
> > However that is helpful. Now that I look, our command is setting
> > -DfailIfNoTests=false. It is not setting
> > -Dsurefire.failIfNoSpecifiedTests=false. I didn't initially catch the
> > difference because they were separated by many pages of log junk. is
> > failIfNoSpecifiedTests new in M6? Or is there some other reason this
> > might trigger now?
> >
> >
> >
> >
> > --
> > Elliotte Rusty Harold
> > elharo@ibiblio.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >



-- 
Elliotte Rusty Harold
elharo@ibiblio.org

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


Re: Possible surefire bug in -Dsurefire.failIfNoSpecifiedTests=false

Posted by Romain Manni-Bucau <rm...@gmail.com>.
It is there since v2.something IIRC, did you check with -X it was really
set to false?

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le jeu. 7 avr. 2022 à 13:28, Elliotte Rusty Harold <el...@ibiblio.org> a
écrit :

> On Thu, Apr 7, 2022 at 11:16 AM Romain Manni-Bucau
> <rm...@gmail.com> wrote:
> >
> > Hi Elliotte,
> >
> > Did you mean -DfailIfNoTests=false? the NoSpecified is for the case you
> > specify a test (-Dtest) IIRC.
> >
>
> No, the error message we see (and didn't see a couple of days ago) is:
>
> Failed to execute goal
> org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M6:test
> (default-cli) on project protobuf-bom: No tests matching pattern
> "**/*Test, !**/*IsValidUtf8Test, !**/*DecodeUtf8Test" were executed!
> (Set -Dsurefire.failIfNoSpecifiedTests=false to ignore this error.) ->
> [Help 1]
>
> However that is helpful. Now that I look, our command is setting
> -DfailIfNoTests=false. It is not setting
> -Dsurefire.failIfNoSpecifiedTests=false. I didn't initially catch the
> difference because they were separated by many pages of log junk. is
> failIfNoSpecifiedTests new in M6? Or is there some other reason this
> might trigger now?
>
>
>
>
> --
> Elliotte Rusty Harold
> elharo@ibiblio.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Possible surefire bug in -Dsurefire.failIfNoSpecifiedTests=false

Posted by Elliotte Rusty Harold <el...@ibiblio.org>.
On Thu, Apr 7, 2022 at 11:16 AM Romain Manni-Bucau
<rm...@gmail.com> wrote:
>
> Hi Elliotte,
>
> Did you mean -DfailIfNoTests=false? the NoSpecified is for the case you
> specify a test (-Dtest) IIRC.
>

No, the error message we see (and didn't see a couple of days ago) is:

Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M6:test
(default-cli) on project protobuf-bom: No tests matching pattern
"**/*Test, !**/*IsValidUtf8Test, !**/*DecodeUtf8Test" were executed!
(Set -Dsurefire.failIfNoSpecifiedTests=false to ignore this error.) ->
[Help 1]

However that is helpful. Now that I look, our command is setting
-DfailIfNoTests=false. It is not setting
-Dsurefire.failIfNoSpecifiedTests=false. I didn't initially catch the
difference because they were separated by many pages of log junk. is
failIfNoSpecifiedTests new in M6? Or is there some other reason this
might trigger now?




-- 
Elliotte Rusty Harold
elharo@ibiblio.org

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


Re: Possible surefire bug in -Dsurefire.failIfNoSpecifiedTests=false

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Elliotte,

Did you mean -DfailIfNoTests=false? the NoSpecified is for the case you
specify a test (-Dtest) IIRC.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le jeu. 7 avr. 2022 à 13:13, Elliotte Rusty Harold <el...@ibiblio.org> a
écrit :

> I'm still debugging our local project, but my team seems to be
> experiencing a problem where surefire fails projects without tests
> even though -Dsurefire.failIfNoSpecifiedTests=false is set. This
> happened suspiciously close in time to the recent 3.0.0-M6 release and
> our upgrade to the same.
>
> I'm by no means certain this is a surefire bug yet, but I wanted to
> throw up an early flag to find out if anyone else has seen this in
> case it is a regression in M6 that needs to be patched.
>
> --
> Elliotte Rusty Harold
> elharo@ibiblio.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>