title: Jenkins with Java Heap Space Exception when executing JUnit-Tests
body: <p>I have a Jenkins running that shall build a Java project of which I know that some of the Unit-Tests are quite RAM greedy. </p>
  
  <p>I think I still got something wrong with the Jenkins memory-assignments, some of my Jobs are failing with an OOM exception, more specifically Java Heap Space.</p>
  
  <p>I gave Jenkins itself 2GB by editing the <code>/etc/default/jenkins</code> file. To ensure that the JUnit-Tests also have enough RAM I assigned as <code>Global MAVEN_OPTS</code> the value <code>-Dmaven.surefire.heap=12g</code> via the Jenkins GUI. </p>
  
  <p>This should be enough to run all tests. But the build is still failing. I am new to  Jenkins, so I would appreciate a pointer what could be the issue here. </p>