db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Embretsen <John.Embret...@Sun.COM>
Subject Re: Do I need to provide extra memory flags when using "ant junitreport"?
Date Wed, 01 Aug 2007 14:36:36 GMT
Bryan Pendleton wrote:
> I've been running JUnit tests directly by running
> 
>   java -Xmx1024m junit.textui.TestRunner 
> org.apache.derbyTesting.functionTests.suites.All
> 
> But recently I've been trying to switch over to
> 
>   ant junitreport
> 
> because I like the nice report I get.
> 
> But do I need to pass the "-Xmx1024m" argument when I run "ant 
> junitreport"?
> I seem to get some "out of memory" problems, so it seems like I
> probably do. But I'm not sure what the syntax ought to be.
>
> Can somebody post whether or not they get a clean run from a
> simple "ant junitreport", or whether they have some special settings
> that they use?

I too get a few OutOfMemoryErrors when I run "ant junitreport" with default 
settings. They disappear if I tell ant to increase the max heap memory to some 
high value. So far I have not been able to do that from the command line, so I 
edited the "junit-core" target in build.xml instead:

Index: build.xml
===================================================================
--- build.xml   (revision 561696)
+++ build.xml   (working copy)
@@ -1696,7 +1696,7 @@
      </condition>
          <junit printsummary="on"
             fork="yes" forkmode="perTest"
-           jvm="${derby.junit.jvm}"
+           jvm="${derby.junit.jvm}" maxmemory="740m"
             showoutput="yes"
             dir="junit_${derby.junit.timestamp}"
                    errorproperty="tests.failed"

I don't think using -Xmx... on the command line or ANT_OPTS=-Xmx... works as 
long as the junit task forks new JVMs.

I still don't have 100% clean test runs, but I think the failures are mostly 
intermittent or due to issues in my environment (need to look at it some more, I 
just returned from vacation). At least I don't see the OutOfMemoryErrors any more.

Hope this helps,

-- 
John



Mime
View raw message