I was able to plug most of the memory leakage by adding
this.context.clear();
to AbstractBridgedXWikiComponentTestCase#tearDown()

core/xwiki-core/ will test with argLine>-Xmx64m added and forkMode>pertest 
removed.

On the one hand it would be nicer to route out the leakage but it also is nice 
to allow
developers to use the context promiscuously in tests without worry about 
introducing stubborn leaks.

I see a doubling in the speed of testing core/xwiki-core/ with mvn clean test.

I'm not around much lately as there is a lot to be done to prepare for winter.

Caleb James DeLisle

Vincent Massol wrote:
> On Oct 19, 2009, at 11:50 AM, Sergiu Dumitriu wrote:
> 
>> On 10/19/2009 11:27 AM, vmassol (SVN) wrote:
>>> Author: vmassol
>>> Date: 2009-10-19 11:27:22 +0200 (Mon, 19 Oct 2009)
>>> New Revision: 24562
>>>
>>> Modified:
>>>    platform/core/branches/xwiki-core-2.0/xwiki-core/pom.xml
>>> Log:
>>> XWIKI-4496: Unit tests need more heap space
>>>
>>> * Isolate tests.
>>>
>>> Merged from trunk (rev 24561)
>>>
>>> Modified: platform/core/branches/xwiki-core-2.0/xwiki-core/pom.xml
>>> ===================================================================
>>> --- platform/core/branches/xwiki-core-2.0/xwiki-core/pom.xml         
>>> 2009-10-19 09:23:06 UTC (rev 24561)
>>> +++ platform/core/branches/xwiki-core-2.0/xwiki-core/pom.xml         
>>> 2009-10-19 09:27:22 UTC (rev 24562)
>>> @@ -819,6 +819,14 @@
>>>    </dependencies>
>>>    <build>
>>>      <plugins>
>>> +<plugin>
>>> +<groupId>org.apache.maven.plugins</groupId>
>>> +<artifactId>maven-surefire-plugin</artifactId>
>>> +<configuration>
>>> +<!-- Prevent Out Of Memory errors resulting from tests that do no  
>>> free up the memory correctly -->
>>> +<forkMode>pertest</forkMode>
>> Does this affect performace? As in longer time to run the tests?
> 
> It should normally affect speed (ie be slower). I haven't done a full  
> comparison but I haven't found that it took way more time than before.  
> I'm waiting for hudson to run to see the speed difference.
> 
> -Vincent
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
> 

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to