Setting PermGen space when running tests

20 views
Skip to first unread message

Howard Lewis Ship

unread,
Dec 10, 2012, 4:27:13 PM12/10/12
to cloju...@googlegroups.com
I'm running out of permgen space when running tests; from looking at the code, this looks like it should allow me to set that:

clojureTest.jvmOptions {
  jvmArgs '-XX:MaxPermSize=256m'
}

I'm not seeing an error, but my code is still failing with PermGen errors. Further, when I use VisualVM to investigate the launched process, the argument does not appear.  What is the right way to pass such options into the test process?

I'm using the patched version of 1.5.3 ("org.clojars.viacoban:clojuresque:1.5.3-SNAPSHOT").

Howard Lewis Ship

unread,
Dec 10, 2012, 5:09:58 PM12/10/12
to cloju...@googlegroups.com
The more I test, the more it looks like the configuration closure is never getting invoked.

Meikel Brandmeyer

unread,
Dec 10, 2012, 6:02:45 PM12/10/12
to cloju...@googlegroups.com
The closure is invoked here: https://bitbucket.org/kotarak/clojuresque/src/4a5998e740e512950cc4feecbe07fde20c7e53cc/clojuresque/src/main/groovy/clojuresque/ClojureTestTask.groovy?at=default#cl-51

Try:

clojureTest.jvmOptions = {
  jvmArgs '-XX:MaxPermSize=256m'
}

Not the =. I must confess, I have never used this code and it is not well tested. Please let me know, whether this solves the problem.

Meikel

Howard Lewis Ship

unread,
Dec 10, 2012, 6:25:07 PM12/10/12
to cloju...@googlegroups.com
I tried this with the = sign as well, and it did not appear to work.
--
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

Howard Lewis Ship

unread,
Dec 10, 2012, 6:33:23 PM12/10/12
to cloju...@googlegroups.com
I'm not an expert on Gradle coding, but this line in the code looks suspicious:

            this.jvmOptions()  // ClojureTestTask.groovy, line 52

Feel liks it should be:

  this.jvmOptions.call(it)


To pass it, the object being configured, into the closure.

Howard Lewis Ship

unread,
Dec 13, 2012, 12:55:56 PM12/13/12
to cloju...@googlegroups.com
I've created a pull request with the fix: passing the action and the jvmOptions to project.configure().

Howard Lewis Ship

unread,
Dec 13, 2012, 1:17:33 PM12/13/12
to cloju...@googlegroups.com
Also, I've put a patched version up on clojars; here's the special sauce:

buildscript {
    repositories {
        mavenCentral()
        mavenRepo name: 'clojars', url: 'http://clojars.org/repo'
    }
    dependencies {
        classpath "com.howardlewisship.patched:clojuresque:1.5.3-SNAPSHOT"
Reply all
Reply to author
Forward
0 new messages