You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Shawn Castrianni <Sh...@halliburton.com> on 2008/05/14 09:05:10 UTC

JUnit crash after successful run

I am getting a forked JVM crash for my junit task after the unit tests run successfully.  I am using ANT 1.7.  I found the report on bug 41104 which is similar, but I never got the FileNotFoundException as described in the bug report and I am pretty sure I don't have two different version of ANT on my classpath.  If I change my junit to a java task and specify the test name as the main class and provide a main method that creates a suite(), it runs fine and the forked JVM does not crash.  One thing I did notice with using a java task is that I see more output on the screen that appears to be coming from System.err.  This System.err is not visible when running with junit task.  Where is it going?  I have tried versions of formatters and such, but I can't get the forked JVM crash to go away.

---
Shawn Castrianni

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient.  Any review, use, distribution, or disclosure by others is strictly prohibited.  If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.

Re: JUnit crash after successful run

Posted by Peter Reilly <pe...@gmail.com>.
Ant does not distribute junit.jar, so the junit.jar file in your
$ANT_HOME/lib directory
would have been placed there independently.

With ant 1.7, the best practice is not to place a junit.jar file in
$ANT_HOME/lib.
Instead, one should use the classpath element of the junit task, and use
a project specific junit.jar.

Peter


On Wed, May 14, 2008 at 8:20 AM, Shawn Castrianni
<Sh...@halliburton.com> wrote:
> Looking inside the junit.jar from my ant/lib directory, I can decompile the Version.class and see that it is version JUnit 3.8.1.  I downloaded JUnit 4.4 from their website and replaced the 3.8.1 jar in my ant/lib directory.  That seems to have fixed the problem.  Is this a proper fix for my problem or is using JUnit 4.4 with ANT 1.7 a bad idea?
>
> ---
> Shawn Castrianni
>
>
> -----Original Message-----
> From: Shawn Castrianni [mailto:Shawn.Castrianni@halliburton.com]
> Sent: Wednesday, May 14, 2008 2:05 AM
> To: 'Ant Users List'
> Subject: JUnit crash after successful run
>
> I am getting a forked JVM crash for my junit task after the unit tests run successfully.  I am using ANT 1.7.  I found the report on bug 41104 which is similar, but I never got the FileNotFoundException as described in the bug report and I am pretty sure I don't have two different version of ANT on my classpath.  If I change my junit to a java task and specify the test name as the main class and provide a main method that creates a suite(), it runs fine and the forked JVM does not crash.  One thing I did notice with using a java task is that I see more output on the screen that appears to be coming from System.err.  This System.err is not visible when running with junit task.  Where is it going?  I have tried versions of formatters and such, but I can't get the forked JVM crash to go away.
>
> ---
> Shawn Castrianni
>
> ----------------------------------------------------------------------
> This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient.  Any review, use, distribution, or disclosure by others is strictly prohibited.  If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: JUnit crash after successful run

Posted by Shawn Castrianni <Sh...@halliburton.com>.
Looking inside the junit.jar from my ant/lib directory, I can decompile the Version.class and see that it is version JUnit 3.8.1.  I downloaded JUnit 4.4 from their website and replaced the 3.8.1 jar in my ant/lib directory.  That seems to have fixed the problem.  Is this a proper fix for my problem or is using JUnit 4.4 with ANT 1.7 a bad idea?

---
Shawn Castrianni


-----Original Message-----
From: Shawn Castrianni [mailto:Shawn.Castrianni@halliburton.com]
Sent: Wednesday, May 14, 2008 2:05 AM
To: 'Ant Users List'
Subject: JUnit crash after successful run

I am getting a forked JVM crash for my junit task after the unit tests run successfully.  I am using ANT 1.7.  I found the report on bug 41104 which is similar, but I never got the FileNotFoundException as described in the bug report and I am pretty sure I don't have two different version of ANT on my classpath.  If I change my junit to a java task and specify the test name as the main class and provide a main method that creates a suite(), it runs fine and the forked JVM does not crash.  One thing I did notice with using a java task is that I see more output on the screen that appears to be coming from System.err.  This System.err is not visible when running with junit task.  Where is it going?  I have tried versions of formatters and such, but I can't get the forked JVM crash to go away.

---
Shawn Castrianni

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient.  Any review, use, distribution, or disclosure by others is strictly prohibited.  If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: JUnit crash after successful run

Posted by "jasper.blues" <ja...@gmail.com>.
Experienced the same problem. Fixed it by removing an old ant-junit.jar from
the classpath. 



Shawn Castrianni wrote:
> 
> I am getting a forked JVM crash for my junit task after the unit tests run
> successfully.  I am using ANT 1.7.  I found the report on bug 41104 which
> is similar, but I never got the FileNotFoundException as described in the
> bug report and I am pretty sure I don't have two different version of ANT
> on my classpath.  If I change my junit to a java task and specify the test
> name as the main class and provide a main method that creates a suite(),
> it runs fine and the forked JVM does not crash.  One thing I did notice
> with using a java task is that I see more output on the screen that
> appears to be coming from System.err.  This System.err is not visible when
> running with junit task.  Where is it going?  I have tried versions of
> formatters and such, but I can't get the forked JVM crash to go away.
> 
> ---
> Shawn Castrianni
> 
> ----------------------------------------------------------------------
> This e-mail, including any attached files, may contain confidential and
> privileged information for the sole use of the intended recipient.  Any
> review, use, distribution, or disclosure by others is strictly prohibited. 
> If you are not the intended recipient (or authorized to receive
> information for the intended recipient), please contact the sender by
> reply e-mail and delete all copies of this message.
> 

-- 
View this message in context: http://old.nabble.com/JUnit-crash-after-successful-run-tp17224723p26933542.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org