jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bret Kumler" <bkum...@goldengate.com>
Subject RE: More coverage issues
Date Thu, 25 Aug 2005 17:03:13 GMT
I have the same problem as you.

I noticed on the cobertura mailing list there's mention of the EOF and
they say to try a sleep call before the report call.

Have you tried it?

-----Original Message-----
From: David Turley [mailto:synath@synath.com] 
Sent: Thursday, August 25, 2005 8:08 AM
To: Cactus Users List
Subject: More coverage issues

I took Bret Kumler's suggestion and got Cobertura.  I'm having a bit of 
a problem with it though.  I don't think cobertura is dumping the 
coverage information soon enough after running the cactus tests.  The 
tests run and then Tomcat starts shutting down and then I get the 
following error:

[cactus] INFO: Illegal access: this web application instance has been 
stopped already (the eventual following stack trace is caused by an 
error thrown for debugging purposes as well as to attempt to terminate 
the thread which caused the illegal access, and has no functional

When I get that error, my cobertura.ser file is suddenly empty and the 
report fails with an EOFException.

Anyone have any thoughts on how to fix this?  Apparently the coverage 
information isn't dumped until the JVM exits.  Is there a way to have 
the tests run on a different fork than the container control part of the


In case anyone cares to see it, here's part of my build.xml:

    <target name="cactus">
        <cactus warfile="${dist.home}/${app.name}.war" fork="yes"
                <path refid="cactus.classpath"/>
                       <fileset dir="${lib.dir}">
                        <include name="struts.jar"/>
            <classpath location="${build.instrumented-classes.dir}"/>
            <classpath location="${build.classes.dir}"/>
            <classpath location="${cactus.test.classes.dir}"/>
            <sysproperty key="net.sourceforge.cobertura.datafile"
            <!--<cactusproperty server="false"
                <cactusproperty server="true"
            <containerset timeout="180000">
                <!-- cactus automatically uses the system temp directory
                     for a temporary tomcat installation.  The directory
                     is as follows: env.TMP/cactus/tomcat5 .  To specify
                     a different temp directory, use the tmpdir 
attribute -->
                      dir="${env.TOMCAT_HOME}" port="8081"
            <formatter type="brief" usefile="false"/>
            <formatter type="xml"/>
            <batchtest todir="${build.reports.dir}">
               <fileset dir="${cactus.test.classes.dir}" 

--David Turley

P.S.  To Bret Kumler, I didn't have any problems with Struts and 
StrutsTestCase when I switched to Cobertura.  I could post more of my 
build.xml if you'd like, but I don't know that it would be much help...

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

This e-mail message and any attachments may contain private, confidential, proprietary or
privileged material of GoldenGate Software, Inc. that is for the sole use of the intended
recipient(s) of this e-mail message.  Any review, copying or distribution or other use of
this e-mail message or any attachments hereto by anyone other than the intended recipient(s)
is strictly prohibited.  If you are not the intended recipient(s) of this e-mail message,
please contact GoldenGate Software, Inc. (415-777-0200) immediately and permanently delete
the original e-mail message and any copies of this e-mail message and all attachments, if

View raw message