jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1358567 - /jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/SQLPathTest.java
Date Sat, 07 Jul 2012 14:06:29 GMT
Author: jukka
Date: Sat Jul  7 14:06:28 2012
New Revision: 1358567

URL: http://svn.apache.org/viewvc?rev=1358567&view=rev
Log:
JCR-3376 TCK: SQLPathTest.testChildAxisRoot expected root node not in result

Revert revision 1357596 until the test failures it causes are resolved.

Modified:
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/SQLPathTest.java

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/SQLPathTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/SQLPathTest.java?rev=1358567&r1=1358566&r2=1358567&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/SQLPathTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/SQLPathTest.java
Sat Jul  7 14:06:28 2012
@@ -69,7 +69,7 @@ public class SQLPathTest extends Abstrac
 
     /**
      * Tests if <somepath>/% returns the descendants of <somepath>.
-     * @throws NotExecutableException
+     * @throws NotExecutableException 
      */
     public void testDescendantTestRoot() throws RepositoryException, NotExecutableException
{
         String sql = getStatement(testRoot + "/%");
@@ -79,7 +79,7 @@ public class SQLPathTest extends Abstrac
     /**
      * Tests if <somepath>/% returns no nodes if node at <somepath>
      * is a leaf.
-     * @throws NotExecutableException
+     * @throws NotExecutableException 
      */
     public void testDescendantLeaf() throws RepositoryException, NotExecutableException {
         // find leaf
@@ -95,7 +95,7 @@ public class SQLPathTest extends Abstrac
      * Tests if <somepath>/%/<nodename> OR <somepath>/<nodename>
      * returns nodes with name <nodename> which are descendants of
      * node at <code>testroot</code>.
-     * @throws NotExecutableException
+     * @throws NotExecutableException 
      */
     public void testDescendantSelfTestRoot() throws RepositoryException, NotExecutableException
{
         // get first node which is two levels deeper than node at testroot
@@ -124,14 +124,11 @@ public class SQLPathTest extends Abstrac
 
     /**
      * Tests if /% AND NOT /%/% returns the child nodes of the root node.
-     * @throws NotExecutableException
+     * @throws NotExecutableException 
      */
     public void testChildAxisRoot() throws RepositoryException, NotExecutableException {
         String sql = getStatement("/%");
-        // need to exclude the root node explicitly (using jcr:path <> '/')
-        // as the specification allows to not return it even if using jcr:path LIKE '/%'
-        // see also JCR specification, section 8.5.2.2 ("Pseudo-property jcr:path")
-        sql += " AND NOT " + jcrPath + " LIKE '/%/%' AND " + jcrPath + " <> '/'";
+        sql += " AND NOT " + jcrPath + " LIKE '/%/%'";
         Node[] nodes = toArray(session.getRootNode().getNodes());
         executeSqlQuery(session, sql, nodes);
     }
@@ -139,7 +136,7 @@ public class SQLPathTest extends Abstrac
     /**
      * Tests if &lt;somepath>/% AND NOT &lt;somepath>/%/% returns the child
      * nodes of node at &lt;somepath>.
-     * @throws NotExecutableException
+     * @throws NotExecutableException 
      */
     public void testChildAxisTestRoot() throws RepositoryException, NotExecutableException
{
         String sql = getStatement(testRoot + "/%");
@@ -151,7 +148,7 @@ public class SQLPathTest extends Abstrac
     /**
      * Tests if &lt;somepath>/% AND NOT &lt;somepath>/%/% returns no nodes
      * if the node at &lt;somepath> is a leaf.
-     * @throws NotExecutableException
+     * @throws NotExecutableException 
      */
     public void testChildAxisLeaf() throws RepositoryException, NotExecutableException {
         // find leaf
@@ -182,7 +179,7 @@ public class SQLPathTest extends Abstrac
      * @return descendants of <code>node</code>.
      * @throws RepositoryException if an error occurs.
      */
-    private static Node[] getDescendants(final Node node) throws RepositoryException {
+    private Node[] getDescendants(final Node node) throws RepositoryException {
         final List<Node> descendants = new ArrayList<Node>();
 
         node.accept(new TraversingItemVisitor.Default() {



Mime
View raw message