Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Avro >> mail # dev >> Setting maxmemory for JUnit tests

Copy link to this message
Setting maxmemory for JUnit tests
I was running into an out-of-memory error while running the  
org.apache.avro.mapred.TestWordCountSpecific and TestWordCountGeneric  

     [junit] java.lang.OutOfMemoryError: Java heap space
     [junit] at org.apache.hadoop.mapred.MapTask
     [junit] at  
     [junit] at org.apache.hadoop.mapred.MapTask.run(MapTask.java:307)
     [junit] at org.apache.hadoop.mapred.LocalJobRunner

I added a maxmemory attribute to the junit task in the Java build.xml,  
and it seemed to fix the problem:

   <macrodef name="test-runner">
     <attribute name="files.location" />
     <attribute name="tests.pattern" />
     <attribute name="test.dir" default="${test.java.build.dir}" />
       <junit showoutput="yes"

I can file a Jira issue and a patch, but seems pretty trivial...

-- Ken

Ken Krugler
+1 530-210-6378
e l a s t i c   w e b   m i n i n g