jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandru Popescu <the.mindstorm.mailingl...@gmail.com>
Subject Re: OutOfMemory while running tests
Date Mon, 06 Feb 2006 09:09:02 GMT
#: Marcel Reutegger changed the world a bit at a time by saying (astral date: 2/6/2006 10:48
AM) :#
> Please check if the repository is really stopped after each test case. 
> What exactly happens in your utility method 
> RepositoryUtil.unRegisterRepository?
> 
> Using the jackrabbit default log4j settings you should also see log 
> messages about repository start and stop in the jcr.log file.
> 
> regards
>   marcel
>

The RepositoryUtil just delegates to RegistryHelper.unregisterRepository(ctx, repositoryName),
so I 
would expect that the repository should be closed.

What should I do enable log4j? Please give me some hints so that we can further clarify the
problem.

tia,

./alex
--
.w( the_mindstorm )p.


> Alexandru Popescu wrote:
>> Hi!
>> 
>> I have a set of tests (more or less unit tests). Considering that I want 
>> to be able to run some of them individually or all of them I have each 
>> TestCase returning a RepositoryLifecycleTestSetup (that is 
>> registering/unregistering the test repository).
>> 
>> [code]
>> public class MyTestClass extends TestCase {
>>     public static Test suite() {
>>         return new RepositoryLifecycleTestSetup(new 
>> TestSuite(MyTestClass.class));
>>     }
>> 
>>     [...]
>> }
>> [/code]
>> 
>> [code]
>> package org.apache.portals.graffito.jcr;
>> 
>> import org.apache.portals.graffito.jcr.repository.RepositoryUtil;
>> 
>> import junit.extensions.TestSetup;
>> import junit.framework.Test;
>> 
>> 
>> /**
>>  * This class/interface
>>  */
>> public class RepositoryLifecycleTestSetup extends TestSetup {
>>     public RepositoryLifecycleTestSetup(Test test) {
>>         super(test);
>>     }
>> 
>>     /**
>>      * @see junit.extensions.TestSetup#setUp()
>>      */
>>     protected void setUp() throws Exception {
>>         super.setUp();
>>         RepositoryUtil.registerRepository("repositoryTest",
>>                 "./src/test-config/repository-derby.xml", 
>> "./target/repository");
>>     }
>> 
>>     /**
>>      * @see junit.extensions.TestSetup#tearDown()
>>      */
>>     protected void tearDown() throws Exception {
>>         RepositoryUtil.unRegisterRepository("repositoryTest");
>>         super.tearDown();
>>     }
>> 
>> 
>> }
>> [/code]
>> 
> 
> 


Mime
View raw message