You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Pankaj Gupta <pa...@brightroll.com> on 2012/09/06 02:58:15 UTC

Increasing heap size for unittests

Hi,

I need to increase the java heap size for my unit tests. These are PigUnit
tests and require a large amount of memory. I'm using buildr gem version
1.4.4.

I've tried putting at top in my build file: ENV['JAVA_OPTS'] ||= '-Xms1g
-Xmx1g'

Also tried:
task 'test' do
    test.with JUNIT
    test.using :java_args => ['-Xmx1024m']
  end

I even tried setting JAVA_OPTS as an environment variable for the buildr
command i.e. JAVA_OPTs=-Xmx1g buildr test

None of these work and I get an out of memory error. I will really
appreciate any suggestions.

Thanks in Advance,
Pankaj

-- 


*P* | (415) 677-9222 ext. 205 *F *| (415) 677-0895 | pankaj@brightroll.com

Pankaj Gupta | Software Engineer

*BrightRoll, Inc. *| Smart Video Advertising | www.brightroll.com


United States | Canada | United Kingdom | Germany


We're hiring<http://newton.newtonsoftware.com/career/CareerHome.action?clientId=8a42a12b3580e2060135837631485aa7>
!

Re: Increasing heap size for unittests

Posted by Damian Monogue <de...@gmail.com>.
Have you retired exporting $JAVA_OPTS? I run buildr using jruby, and this
approach was the only one which worked for me.
On Sep 5, 2012 8:58 PM, "Pankaj Gupta" <pa...@brightroll.com> wrote:

> Hi,
>
> I need to increase the java heap size for my unit tests. These are PigUnit
> tests and require a large amount of memory. I'm using buildr gem version
> 1.4.4.
>
> I've tried putting at top in my build file: ENV['JAVA_OPTS'] ||= '-Xms1g
> -Xmx1g'
>
> Also tried:
> task 'test' do
>     test.with JUNIT
>     test.using :java_args => ['-Xmx1024m']
>   end
>
> I even tried setting JAVA_OPTS as an environment variable for the buildr
> command i.e. JAVA_OPTs=-Xmx1g buildr test
>
> None of these work and I get an out of memory error. I will really
> appreciate any suggestions.
>
> Thanks in Advance,
> Pankaj
>
> --
>
>
> *P* | (415) 677-9222 ext. 205 *F *| (415) 677-0895 | pankaj@brightroll.com
>
> Pankaj Gupta | Software Engineer
>
> *BrightRoll, Inc. *| Smart Video Advertising | www.brightroll.com
>
>
> United States | Canada | United Kingdom | Germany
>
>
> We're hiring<
> http://newton.newtonsoftware.com/career/CareerHome.action?clientId=8a42a12b3580e2060135837631485aa7
> >
> !
>