3 messages in com.googlegroups.testng-users[testng-users] InheritableThreadLocal...
FromSent OnAttachments
Pavel Georgiev14 Jun 2008 16:35 
Cédric Beust ♔14 Jun 2008 18:11 
Pavel Georgiev25 Jun 2008 03:19 
Subject:[testng-users] InheritableThreadLocal and java.lang.OutOfMemoryError: Java heap space
From:Pavel Georgiev (pave@gmail.com)
Date:06/14/2008 04:35:31 PM
List:com.googlegroups.testng-users

Hi,

I hope that sombody can help me:).

I have modified my tests to use InheritableThreadLocal so that i can run them in parralel.

-------- snip -------- public class whatever {

private final InheritableThreadLocal<ActionFixture> mActionFixture = new InheritableThreadLocal<ActionFixture>();

// Some setup so that i do not write this for each test method @BeforeMethod public void before() { mActionFixture.set(new ActionFixture(blah)); mActionFixture.get().doSomething .... }

@AfterMethod public void after() throws Exception { mActionFixture.remove(); }

@Test public void test() { mActionFixture.get().doTheTest(); } }

I have close to 50 test clases and ~300 testcases (some of them use dataprovider). Before the InheritableThreadLocal change everything was fine. After modifying them i cannot run the whole suite because of "OutOfMemoryError".

Am i using this incorrectly?

Your help is very much appreciated.