You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Julian Reschke <ju...@gmx.de> on 2006/08/09 18:41:01 UTC

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

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?

Posted by Julian Reschke <ju...@gmx.de>.
Marcel Reutegger schrieb:
> 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.

OK, let's take AddNodeTest.java as example. This is clearly a Level2 
test, and thus it doesn't set isReadOnly. However, it *is* executed for 
a Level1 repository, and fails in the cleanup code. I think something is 
wrong here...

Best regards, Julian



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

Posted by Marcel Reutegger <ma...@gmx.net>.
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