jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gennady Azarenkov <gazaren...@gmail.com>
Subject Re: TCK: SessionTest.testMoveItemExistsException()
Date Fri, 25 Nov 2005 10:11:01 GMT
hi Marcel,

> first of all, sorry for the delay but I was busy with some other work.
it's ok, i am just beginning to think that it is a wrong place for TCK 
questions :)

it seems there is s situation like this here

org.apache.jackrabbit.test.api.SetPropertyAssumeTypeTest.testValueConstraintVioloationExceptionBecauseOfInvalidTypeParameter(SetPropertyAssumeTypeTest.java:445)

and here

org.apache.jackrabbit.test.api.SetPropertyAssumeTypeTest.testStringConstraintVioloationExceptionBecauseOfInvalidTypeParameter(SetPropertyAssumeTypeTest.java:479)

test tries to set date property with "abc" value and i have
ValueFormatException instead of ConstraintViolationException in our impl

take a look pls,

regards,
gena

Gennady Azarenkov

eXo platform

----- Original Message ----- 
From: "Marcel Reutegger" <marcel.reutegger@gmx.net>
To: <jackrabbit-dev@incubator.apache.org>
Sent: Friday, November 25, 2005 10:59 AM
Subject: Re: TCK: SessionTest.testMoveItemExistsException()


> Hi Gennady,
>
> first of all, sorry for the delay but I was busy with some other work.
>
> you are right, the exception declarations with their documentation are not 
> 100% clear. The test should therefore only create a situation where a 
> ItemExistsException can be thrown.
>
> Thanks for the suggestion. I have changed the test case accordingly in svn 
> revision: 348915
>
> regards
>  marcel
>
> Gennady Azarenkov wrote:
>> hi,
>>
>> it seems to me that SessionTest.testMoveItemExistsException() is not 
>> completely correct:
>>
>> here testNodeType is "nt:unstructured"
>> Node moveNode = srcParentNode.addNode(nodeName2, testNodeType);
>>
>> here getProperty("nodetype2") is "nt:folder"
>> Node destParentNode = defaultRootNode.addNode(nodeName3, 
>> getProperty("nodetype2"));
>> // add a valid child
>> Node destNode = destParentNode.addNode(nodeName2, 
>> getProperty("nodetype3"));
>>
>> So,
>> superuser.move(moveNode.getPath(), destNode.getPath());
>> can throw ConstraintViolationException (not only ItemExistsException)
>> because of attempt to add node of nt:unstructured type to nt:folder 
>> parent and it is depend on
>> implementation what will be thrown in fact (our impl throws 
>> ConstraintViolationException first :) ).
>>
>> i would replace
>> Node moveNode = srcParentNode.addNode(nodeName2, testNodeType);
>> with
>> Node moveNode = srcParentNode.addNode(nodeName2, 
>> getProperty("nodetype3"));
>>
>> regards,
>> gena
>>
>> Gennady Azarenkov
>> eXo platform
>> 


Mime
View raw message