You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Gennady Azarenkov <ga...@gmail.com> on 2006/02/27 15:44:40 UTC
TCK query/SaveTest
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
Re: TCK query/SaveTest
Posted by Marcel Reutegger <ma...@gmx.net>.
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