You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Randall Fidler <ra...@testadvantage.com> on 2010/03/11 22:27:36 UTC

Test fail for release:perform only - no failure info

Hello,

 

 

     Seeing something weird... a project where all tests pass for
release:prepare but release:perform says it has test failures.  None of
the tests show up with the << FAILURE notation.  I also looked through
all the surefire reports and none of the tests are failing.  I tried
running with error trace (-e) but that provided no further information.


 

I'm using Maven 2.0.9.

 

Any ideas?  Where to start looking?

 

Thanks!

 

Randall


Re: Test fail for release:perform only - no failure info

Posted by Brett Randall <ja...@gmail.com>.
Nice one. Adding an svn:ignore to a new project/module's target
directory is about the first thing I do for a new artifact.

Brett


On 3/16/10, Randall Fidler <ra...@testadvantage.com> wrote:
> Finally!  As suspected... it was some stupid trivial item.  I'm posting this
> just so the thread on the mail archive will be complete.
>
> Effectively what was causing the issue was some of surefire reports got
> checked into the scm under the target directory
> {project}/target/surefire-reports.  This is what caused surefire via release
> plugin to fail on the perform goal and not the prepare goal.  Reason being
> is that prepare runs a clean (and I usually run mvn clean release:prepare
> anyhow) as it's first step.  When the release goal was running, it would
> check out the entire project again to {project}/target/checkout/ in which
> those same surefire reports that were in the scm, would be placed into
> {project}/target/checkout/target/surefire-reports.  As a consequence, the
> surefire plugin would bomb on perform and not prepare (because prepare
> deleted them via it's own clean execution). Perform would does not run a
> clean so when it checked out the entire project again, the reports were in
> the target directory which throws surefire for a loop.
>
> I wish surefire would give you more information, such as it had a problem
> with a report file already existing, that would have saved SO much time, oh
> well.
>
> Lesson learned: Make sure you don't check anything into your projects target
> directory on your SCM, IT'S NOT A GOOD IDEA! ;)
>
>
> Regards,
>
> Randall
>
> -----Original Message-----
> From: Randall Fidler [mailto:randall.fidler@testadvantage.com]
> Sent: Monday, March 15, 2010 1:32 PM
> To: Maven Users List
> Subject: RE: Test fail for release:perform only - no failure info
>
> Wayne,
>
>     One issue... how do you get the "maven.surefire.debug" option to the
> surefire plugin since it's running via the release plugin?  For instance, if
> I try to tell it just to skip tests, (i.e. -Dmaven.test.skip=true) it won't
> because the release plugin has it's own surefire config (I'm guessing).  So
> even if I want to debug it using Eclipse to attach to the test jvm, I don't
> see how can I get that parameter to the surefire instance that the release
> plugin is firing up.  I'll try anyhow, but think this will be a problem.
>
> Regards,
>
> Randall
>
> -----Original Message-----
> From: Wayne Fay [mailto:waynefay@gmail.com]
> Sent: Monday, March 15, 2010 1:14 PM
> To: Maven Users List
> Subject: Re: Test fail for release:perform only - no failure info
>
>>    I read somewhere that you can hook a debugger to the surefire plugin,
>> is that what you're talking about?  I believe that plugin has a parameter
>> that tells it to wait until the "debugger" has connected and then it
>> proceeds
>> to run the tests.
>
> Googling "maven surefire debugger" brought the proper results to the
> top... give it a try. ;-)
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

-- 
Sent from my mobile device

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


Re: Test fail for release:perform only - no failure info

Posted by Wayne Fay <wa...@gmail.com>.
> I wish surefire would give you more information, such as it had a problem
> with a report file already existing, that would have saved SO much time, oh well.

Please file a JIRA so this can possibly be addressed in a future
surefire release.

> Lesson learned: Make sure you don't check anything into your projects
> target directory on your SCM, IT'S NOT A GOOD IDEA! ;)

This is Maven 101.

Wayne

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


RE: Test fail for release:perform only - no failure info

Posted by Randall Fidler <ra...@testadvantage.com>.
Finally!  As suspected... it was some stupid trivial item.  I'm posting this just so the thread on the mail archive will be complete.

Effectively what was causing the issue was some of surefire reports got checked into the scm under the target directory {project}/target/surefire-reports.  This is what caused surefire via release plugin to fail on the perform goal and not the prepare goal.  Reason being is that prepare runs a clean (and I usually run mvn clean release:prepare anyhow) as it's first step.  When the release goal was running, it would check out the entire project again to {project}/target/checkout/ in which those same surefire reports that were in the scm, would be placed into {project}/target/checkout/target/surefire-reports.  As a consequence, the surefire plugin would bomb on perform and not prepare (because prepare deleted them via it's own clean execution). Perform would does not run a clean so when it checked out the entire project again, the reports were in the target directory which throws surefire for a loop.

I wish surefire would give you more information, such as it had a problem with a report file already existing, that would have saved SO much time, oh well.

Lesson learned: Make sure you don't check anything into your projects target directory on your SCM, IT'S NOT A GOOD IDEA! ;)


Regards,

Randall

-----Original Message-----
From: Randall Fidler [mailto:randall.fidler@testadvantage.com] 
Sent: Monday, March 15, 2010 1:32 PM
To: Maven Users List
Subject: RE: Test fail for release:perform only - no failure info

Wayne,

    One issue... how do you get the "maven.surefire.debug" option to the surefire plugin since it's running via the release plugin?  For instance, if I try to tell it just to skip tests, (i.e. -Dmaven.test.skip=true) it won't because the release plugin has it's own surefire config (I'm guessing).  So even if I want to debug it using Eclipse to attach to the test jvm, I don't see how can I get that parameter to the surefire instance that the release plugin is firing up.  I'll try anyhow, but think this will be a problem.

Regards,

Randall

-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com] 
Sent: Monday, March 15, 2010 1:14 PM
To: Maven Users List
Subject: Re: Test fail for release:perform only - no failure info

>    I read somewhere that you can hook a debugger to the surefire plugin,
> is that what you're talking about?  I believe that plugin has a parameter
> that tells it to wait until the "debugger" has connected and then it proceeds
> to run the tests.

Googling "maven surefire debugger" brought the proper results to the
top... give it a try. ;-)

Wayne

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


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


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


RE: Test fail for release:perform only - no failure info

Posted by Randall Fidler <ra...@testadvantage.com>.
Wayne,

    One issue... how do you get the "maven.surefire.debug" option to the surefire plugin since it's running via the release plugin?  For instance, if I try to tell it just to skip tests, (i.e. -Dmaven.test.skip=true) it won't because the release plugin has it's own surefire config (I'm guessing).  So even if I want to debug it using Eclipse to attach to the test jvm, I don't see how can I get that parameter to the surefire instance that the release plugin is firing up.  I'll try anyhow, but think this will be a problem.

Regards,

Randall

-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com] 
Sent: Monday, March 15, 2010 1:14 PM
To: Maven Users List
Subject: Re: Test fail for release:perform only - no failure info

>    I read somewhere that you can hook a debugger to the surefire plugin,
> is that what you're talking about?  I believe that plugin has a parameter
> that tells it to wait until the "debugger" has connected and then it proceeds
> to run the tests.

Googling "maven surefire debugger" brought the proper results to the
top... give it a try. ;-)

Wayne

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


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


RE: Test fail for release:perform only - no failure info

Posted by Randall Fidler <ra...@testadvantage.com>.
Thank you, I appreciate it.  I'll let ya know what I find.

Regards,

Randall

-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com] 
Sent: Monday, March 15, 2010 1:14 PM
To: Maven Users List
Subject: Re: Test fail for release:perform only - no failure info

>    I read somewhere that you can hook a debugger to the surefire plugin,
> is that what you're talking about?  I believe that plugin has a parameter
> that tells it to wait until the "debugger" has connected and then it proceeds
> to run the tests.

Googling "maven surefire debugger" brought the proper results to the
top... give it a try. ;-)

Wayne

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


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


Re: Test fail for release:perform only - no failure info

Posted by Wayne Fay <wa...@gmail.com>.
>    I read somewhere that you can hook a debugger to the surefire plugin,
> is that what you're talking about?  I believe that plugin has a parameter
> that tells it to wait until the "debugger" has connected and then it proceeds
> to run the tests.

Googling "maven surefire debugger" brought the proper results to the
top... give it a try. ;-)

Wayne

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


RE: Test fail for release:perform only - no failure info

Posted by Randall Fidler <ra...@testadvantage.com>.
Wayne,

    I read somewhere that you can hook a debugger to the surefire plugin, is that what you're talking about?  I believe that plugin has a parameter that tells it to wait until the "debugger" has connected and then it proceeds to run the tests.

Can you give me suggestions on setup/environment to do that?  Thanks for your help by the way.

Regards,

Randall


-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com] 
Sent: Monday, March 15, 2010 11:26 AM
To: Maven Users List
Subject: Re: Test fail for release:perform only - no failure info

> It seems like the surefire 'thread' is just bailing out.  One other
> thing to note just to be complete, I also tried running with Java 1.6
> (thinking maybe somebody else put a 1.6 specific test case in the
> project) but it gets the same result as using 1.5.

You may need to bundle things up into something you can share
(assuming this is even possible) that has the problem so others can
take a look at it. Otherwise you'll need to get it into a runtime
debugger and see where things go wrong yourself.

Wayne

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


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


Re: Test fail for release:perform only - no failure info

Posted by Wayne Fay <wa...@gmail.com>.
> It seems like the surefire 'thread' is just bailing out.  One other
> thing to note just to be complete, I also tried running with Java 1.6
> (thinking maybe somebody else put a 1.6 specific test case in the
> project) but it gets the same result as using 1.5.

You may need to bundle things up into something you can share
(assuming this is even possible) that has the problem so others can
take a look at it. Otherwise you'll need to get it into a runtime
debugger and see where things go wrong yourself.

Wayne

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


RE: Test fail for release:perform only - no failure info

Posted by Randall Fidler <ra...@testadvantage.com>.
Wayne,

All the test reports/output show no errors - all the test reports who
each test passing.  I spent the time and went through each one, there
are no errors.

I had one test which required line arguments to be set to increase the
amount of memory and set the perm size (the one thing that seems to have
changed since release:perform last worked).  I removed that test and the
line arguments from the surefire configuration, same result.

It seems like the surefire 'thread' is just bailing out.  One other
thing to note just to be complete, I also tried running with Java 1.6
(thinking maybe somebody else put a 1.6 specific test case in the
project) but it gets the same result as using 1.5.

Regards,

Randall

-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com] 
Sent: Monday, March 15, 2010 10:29 AM
To: Maven Users List
Subject: Re: Test fail for release:perform only - no failure info

> [INFO] Please refer to D:\Project\Code\Library\x_3.0.0\target\c
> heckout\target\surefire-reports for the individual test results.

Any info here that might help?

Wayne

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


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


Re: Test fail for release:perform only - no failure info

Posted by Wayne Fay <wa...@gmail.com>.
> [INFO] Please refer to D:\Project\Code\Library\x_3.0.0\target\c
> heckout\target\surefire-reports for the individual test results.

Any info here that might help?

Wayne

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


RE: Test fail for release:perform only - no failure info

Posted by Randall Fidler <ra...@testadvantage.com>.
Hello,

      Still can't get this bugger to work.  I've locked down the version of the surefire plugin to the latest (2.5), using Maven 2.2.1 and found a thread (http://jira.codehaus.org/browse/MRELEASE-140) thinking that perhaps something with the site plugin might be screwing up the release:perform so I tried taking out anything site related (site plugin config, etc) - but still no luck.

Just to recap...

Mvn test works fine, mvn release:prepare works fine (all tests pass)

Tests fail with mvn release:perform, except there aren't any test failures!

[INFO] Running com.x.exception.XExceptionTest
[INFO] Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
[INFO] [INFO] ------------------------------------------------------------------
------
[INFO] [ERROR] BUILD FAILURE
[INFO] [INFO] ------------------------------------------------------------------
------
[INFO] [INFO] There are test failures.
[INFO]
[INFO] Please refer to D:\Project\Code\Library\x_3.0.0\target\c
heckout\target\surefire-reports for the individual test results.
[INFO] [INFO] ------------------------------------------------------------------
------
[INFO] [INFO] For more information, run Maven with the -e switch
[INFO] [INFO] ------------------------------------------------------------------
------
[INFO] [INFO] Total time: 10 seconds
[INFO] [INFO] Finished at: Mon Mar 15 10:14:29 MST 2010
[INFO] [INFO] Final Memory: 20M/39M
[INFO] [INFO] ------------------------------------------------------------------
------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Maven execution failed, exit code: '1'

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 46 seconds

You can see from above that the build fails, but there are no summary stats, such as "Tests: 506  Failures: 17   Errors:7", it's as if the surefire plugin just stopped.

Failure seemed to occur with one particular test, I removed that test and the problem just moved to another test, so doensn't appear to be test dependent.

Tried using Windows/Linux machines (just to ensure it wasn't something machine dependent), still no joy.

I also tried changing surefire forkmode to pretest, but that didn't change anything.

This project normally takes more than 10m to run, notice the total time is 1m 46s, some something is very screwy, just can't figure out what changed.  This same project was running release:perform fine with Maven 2.0.9 a few months ago (this same project does get the same error with Maven 2.0.9, btw... I only upgraded to 2.2.1 to try and resolve this issue).

Any suggestions/insight is greatly appreciated.

Thanks!

Randall

-----Original Message-----
From: Randall Fidler [mailto:randall.fidler@testadvantage.com] 
Sent: Friday, March 12, 2010 10:37 AM
To: Maven Users List
Subject: RE: Test fail for release:perform only - no failure info

Hmm... just tried with Maven 2.2.1 and surefire plugin vesion 2.5.  Still none of the tests are failing but the build fails because there are test errors.  I thought it was one particular test, but I removed it from the project and same result.  All tests pass on release:prepare but I get the "build failed due to test failures with no failing tests" when I do release:perform.

Ideas?

Thanks!

Randall

-----Original Message-----
From: Randall Fidler [mailto:randall.fidler@testadvantage.com] 
Sent: Thursday, March 11, 2010 3:18 PM
To: Maven Users List
Subject: RE: Test fail for release:perform only - no failure info

I'm downloading Maven 2.2.1 right now.  I'm on a 'loaner' laptop as mine is in the shop so I think not having MAVEN_OPTS set for memory settings could be an option.  Maybe it runs out of memory under the release:perform and not release:prepare?  Anyhow, I'll give both a try.

Thanks!  Any other ideas are welcome.

Regards,

Randall

-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com] 
Sent: Thursday, March 11, 2010 3:08 PM
To: Maven Users List
Subject: Re: Test fail for release:perform only - no failure info

> I'm using Maven 2.0.9.
> Any ideas?  Where to start looking?

Did you try Maven 2.0.10? Or 2.0.11 that was recently released? Or
2.2.1 for that matter if you don't need to use JDK 1.4?

Wayne

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


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


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


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


RE: Test fail for release:perform only - no failure info

Posted by Randall Fidler <ra...@testadvantage.com>.
Hmm... just tried with Maven 2.2.1 and surefire plugin vesion 2.5.  Still none of the tests are failing but the build fails because there are test errors.  I thought it was one particular test, but I removed it from the project and same result.  All tests pass on release:prepare but I get the "build failed due to test failures with no failing tests" when I do release:perform.

Ideas?

Thanks!

Randall

-----Original Message-----
From: Randall Fidler [mailto:randall.fidler@testadvantage.com] 
Sent: Thursday, March 11, 2010 3:18 PM
To: Maven Users List
Subject: RE: Test fail for release:perform only - no failure info

I'm downloading Maven 2.2.1 right now.  I'm on a 'loaner' laptop as mine is in the shop so I think not having MAVEN_OPTS set for memory settings could be an option.  Maybe it runs out of memory under the release:perform and not release:prepare?  Anyhow, I'll give both a try.

Thanks!  Any other ideas are welcome.

Regards,

Randall

-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com] 
Sent: Thursday, March 11, 2010 3:08 PM
To: Maven Users List
Subject: Re: Test fail for release:perform only - no failure info

> I'm using Maven 2.0.9.
> Any ideas?  Where to start looking?

Did you try Maven 2.0.10? Or 2.0.11 that was recently released? Or
2.2.1 for that matter if you don't need to use JDK 1.4?

Wayne

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


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


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


RE: Test fail for release:perform only - no failure info

Posted by Randall Fidler <ra...@testadvantage.com>.
I'm downloading Maven 2.2.1 right now.  I'm on a 'loaner' laptop as mine is in the shop so I think not having MAVEN_OPTS set for memory settings could be an option.  Maybe it runs out of memory under the release:perform and not release:prepare?  Anyhow, I'll give both a try.

Thanks!  Any other ideas are welcome.

Regards,

Randall

-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com] 
Sent: Thursday, March 11, 2010 3:08 PM
To: Maven Users List
Subject: Re: Test fail for release:perform only - no failure info

> I'm using Maven 2.0.9.
> Any ideas?  Where to start looking?

Did you try Maven 2.0.10? Or 2.0.11 that was recently released? Or
2.2.1 for that matter if you don't need to use JDK 1.4?

Wayne

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


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


Re: Test fail for release:perform only - no failure info

Posted by Wayne Fay <wa...@gmail.com>.
> I'm using Maven 2.0.9.
> Any ideas?  Where to start looking?

Did you try Maven 2.0.10? Or 2.0.11 that was recently released? Or
2.2.1 for that matter if you don't need to use JDK 1.4?

Wayne

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


RE: Test fail for release:perform only - no failure info

Posted by Randall Fidler <ra...@testadvantage.com>.
Locked it down the latest surefire plugin version, just for tricks - no
joy.

-----Original Message-----
From: Randall Fidler [mailto:randall.fidler@testadvantage.com] 
Sent: Thursday, March 11, 2010 2:28 PM
To: users@maven.apache.org
Subject: Test fail for release:perform only - no failure info

Hello,

 

 

     Seeing something weird... a project where all tests pass for
release:prepare but release:perform says it has test failures.  None of
the tests show up with the << FAILURE notation.  I also looked through
all the surefire reports and none of the tests are failing.  I tried
running with error trace (-e) but that provided no further information.


 

I'm using Maven 2.0.9.

 

Any ideas?  Where to start looking?

 

Thanks!

 

Randall


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