vijayjcp / powermock

Automatically exported from code.google.com/p/powermock
Apache License 2.0
0 stars 2 forks source link

java.lang.OutOfMemoryError:PermGen space with powermock 1.5.2 #500

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What version of the product are you using? On what operating system?
powermock 1.5.2

Please provide any additional information below.

I am using powermock mockito api. I have around 28 JUnit classes where I am 
using PowerMockRunner. 
In my project I am using Spring integration also.

Whenever I ran JUnits, I am getting Out Of Memory error.

What I need to do to fix this issue? 

Thanks,
Siddheshwar

Original issue reported on code.google.com by nark...@gmail.com on 19 May 2014 at 2:13

GoogleCodeExporter commented 8 years ago
I debugged it little more.

When I execute in below pattern -- 
(plain junits & mockito junits ) + PowerMock junits -- No issues
(plain junits & mockito junits ) + Integration junits -- No issues 10:51 AM 
(plain junits & mockito junits ) + PowerMock junits + Integration junits -- OOM 
issue

My integration test uses SpringContext loading and InMemory Jersy test runner. 
I am loading spring context only once.

I have added below entry in JUnits where I am using PowerMockRunner.
@PowerMockIgnore({"org.apache.log4j.*","org.slf4j.*","com.sun.jersey.*","org.spr
ingframework.*"})

Can anyone update why this issue is coming.

Original comment by nark...@gmail.com on 20 May 2014 at 9:58

GoogleCodeExporter commented 8 years ago
Note sure, it could be a memory leak perhaps? Or you just need to increase your 
permgen space if you're using a legacy java version.

Original comment by johan.ha...@gmail.com on 28 May 2014 at 12:50