jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew van der Voort" <and...@astarte.co.nz>
Subject Memory usage with ant
Date Wed, 23 Apr 2003 04:29:54 GMT
We have an ant task to perform our testing. This ant task starts jboss and
invokes junit telling it to run all our test classes. Since the test
classes all end in 'Test' (e.g. ProjectTest) and no other class does, it
just picks up all the struts test classes. 

Note that we do not have an AllTests class which builds up a suite of all
the test classes since what we've done picks them all up anyway. We tried
using the AllTests approach, but it made no difference. 

Note also that we are using StrutsTestCase for JUnit on the front end to
drive struts and that this is in container testing not mock.

The start jboss task looks like this:
  <target name="jboss.start" description="Starts JBoss on local
    <java classname="org.jboss.Main"
fork="true" dir="${jboss.home}/bin"  >
      <jvmarg value="-Dprogram.name=run.bat"/>
      <jvmarg value="-Xms256m"/>
      <jvmarg value="-Xmx384m"/>      

The ant task looks like this:
    <junit printsummary="false"
      <classpath refid="test.classpath.compilation"/>
      <formatter type="brief" usefile="false"/>
      <formatter type="xml"/>
      <batchtest todir="${test.data.dir}">
        <fileset dir="${build.dir}/classes" includes="**/*Test.class"/>
All the tests run, but the memory used is enormous. We are regularly
hitting a situation where the tests halt with an out of memory condition
and end up having to bump the memory available to JBoss. The process
running the tests gets to about 73M at the time JBoss is started, then on
up to about 367M by the time the tests are finished. This makes for a total
machine memory footprint of over 625M which immediately drops to 153M once
the tests are finished. We have 290 tests in 37 classes.

Does anyone know why this might be? This is getting worse and worse, and we
are getting to a point where it is not scalable to continue writing test

Thanks, Andrew

View raw message