org.apache.jackrabbit.test.api.TestAll against L1 repository?

2006-08-09 Thread Julian Reschke

Hi,

as far as I understand, the TCK is supposed to run against an L1 (== 
read only) repository. For instance, the property tests certainly try to 
find testable properties without having to create them...


Now, AbstractJCRTest.cleanUpTestRoot fails due to 
UnsupportedOperationExceptions over here. Shouldn't the whole method 
only excute when isSupported(LEVEL2)? Or am I missing a parameter to set 
to keep the tests from trying to do the write accesses?


Best regards, Julian


Re: org.apache.jackrabbit.test.api.TestAll against L1 repository?

2006-08-09 Thread Marcel Reutegger

Julian Reschke wrote:
as far as I understand, the TCK is supposed to run against an L1 (== 
read only) repository. For instance, the property tests certainly try to 
find testable properties without having to create them...


Now, AbstractJCRTest.cleanUpTestRoot fails due to 
UnsupportedOperationExceptions over here. Shouldn't the whole method 
only excute when isSupported(LEVEL2)? Or am I missing a parameter to set 
to keep the tests from trying to do the write accesses?


All Level 1 tests should set the isReadOnly in their setUp() method 
before super.setUp() is called. E.g. AbstractPropertyTest does this:


protected void setUp() throws Exception {
isReadOnly = true;
super.setUp();
[...]


This will have the effect that only level 2 tests call cleanUpTestRoot 
in setUp() or tearDown().


When you run the TCK on a repository implementation all tests will be 
executed. On a level 1 repository even the level 2 tests will be 
executed but most certainly fail. This does not have an effect on the 
level 1 compliance.


regards
 marcel