jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: TCK query/SaveTest
Date Tue, 28 Feb 2006 08:41:19 GMT
Hi Gena,

you are right, the test case does not properly handle the case when the 
test root node does not allow same name siblings.

I adapted the test case to also check whether same name siblings are 
allowed:
http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/query/SaveTest.java?rev=381593&r1=381592&r2=381593&view=diff

thanks for reporting this issue.

regards
  marcel

Gennady Azarenkov wrote:
> hi, 
> 
> in TCK query/SaveTest
>      
>   public void testItemExistsException() throws RepositoryException {
>         Query query = superuser.getWorkspace().getQueryManager().createQuery(statement,
Query.XPATH);
>         query.storeAsNode(testRoot + "/" + nodeName1);
> 
>         // create another one
>         query = superuser.getWorkspace().getQueryManager().createQuery(statement, Query.XPATH);
>         try {
>             query.storeAsNode(testRoot + "/" + nodeName1);
>             fail("Query.storeAsNode() did not throw ItemExistsException");
>         } catch (ItemExistsException e) {
>             // expected behaviour
>         }
>     }
> 
> but testRoot  is an nt:unstructured node so same name sibling is allowed...
> or i missed something in TCK configuration?
> 
> regards,
> 
> gena


Mime
View raw message