jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1702201 - in /jackrabbit/trunk: jackrabbit-core/pom.xml jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/qom/NodeLocalNameTest.java
Date Thu, 10 Sep 2015 09:53:48 GMT
Author: thomasm
Date: Thu Sep 10 09:53:48 2015
New Revision: 1702201

URL: http://svn.apache.org/r1702201
Log:
OAK-3265 Test failures: NodeLocalNameTest (fixed the test case, marked as known issue)

Modified:
    jackrabbit/trunk/jackrabbit-core/pom.xml
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/qom/NodeLocalNameTest.java

Modified: jackrabbit/trunk/jackrabbit-core/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/pom.xml?rev=1702201&r1=1702200&r2=1702201&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/pom.xml (original)
+++ jackrabbit/trunk/jackrabbit-core/pom.xml Thu Sep 10 09:53:48 2015
@@ -116,6 +116,9 @@ org.apache.jackrabbit.core.data.Concurre
 org.apache.jackrabbit.core.data.GarbageCollectorTest#testCloseSessionWhileRunningGc
 org.apache.jackrabbit.core.ReplacePropertyWhileOthersReadTest <!-- JCR-3835 -->
 org.apache.jackrabbit.core.security.user.MembershipCachePerfTest <!-- don't run expensive
test -->
+org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testStringLiteralInvalidName 
      <!-- OAK-3265 -->
+org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testPathLiteral              
      <!-- OAK-3265 -->
+org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testURILiteral               
      <!-- OAK-3265 -->
               </value>
             </property>
             <property>

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/qom/NodeLocalNameTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/qom/NodeLocalNameTest.java?rev=1702201&r1=1702200&r2=1702201&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/qom/NodeLocalNameTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/qom/NodeLocalNameTest.java
Thu Sep 10 09:53:48 2015
@@ -20,6 +20,7 @@ import javax.jcr.RepositoryException;
 import javax.jcr.Value;
 import javax.jcr.Node;
 import javax.jcr.PropertyType;
+import javax.jcr.query.InvalidQueryException;
 import javax.jcr.query.Query;
 import javax.jcr.query.qom.QueryObjectModelConstants;
 import javax.jcr.query.qom.QueryObjectModel;
@@ -64,8 +65,12 @@ public class NodeLocalNameTest extends A
 
     public void testStringLiteralInvalidName() throws RepositoryException {
         Value literal = superuser.getValueFactory().createValue("[" + nodeLocalName);
-        Query q = createQuery(QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO, literal);
-        checkResult(q.execute(), new Node[]{});
+        try {
+            createQuery(QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO, literal);
+            fail("NodeName comparison with STRING that cannot be converted to NAME must fail
with InvalidQueryException");
+        } catch (InvalidQueryException e) {
+            // expected
+        }
     }
 
     public void testBinaryLiteral() throws RepositoryException {
@@ -120,13 +125,21 @@ public class NodeLocalNameTest extends A
 
         literal = superuser.getValueFactory().createValue(
                 node1.getPath(), PropertyType.PATH);
-        qom = createQuery(QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO, literal);
-        checkQOM(qom, new Node[]{});
+        try {
+            createQuery(QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO, literal);
+            fail("NodeName comparison with absolute PATH must fail with InvalidQueryException");
+        } catch (InvalidQueryException e) {
+            // expected
+        }
 
         literal = superuser.getValueFactory().createValue(
                 nodeName1 + "/" + nodeName1, PropertyType.PATH);
-        qom = createQuery(QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO, literal);
-        checkQOM(qom, new Node[]{});
+        try {
+            createQuery(QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO, literal);
+            fail("NodeName comparison with PATH length >1 must fail with InvalidQueryException");
+        } catch (InvalidQueryException e) {
+            // expected
+        }
     }
 
     public void testReferenceLiteral() throws RepositoryException,
@@ -149,8 +162,12 @@ public class NodeLocalNameTest extends A
 
     public void testURILiteral() throws RepositoryException {
         Value literal = superuser.getValueFactory().createValue("http://example.com", PropertyType.URI);
-        QueryObjectModel qom = createQuery(QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO,
literal);
-        checkQOM(qom, new Node[]{});
+        try {
+            createQuery(QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO, literal);
+            fail("NodeName comparison with URI that cannot be converted to NAME must fail
with InvalidQueryException");
+        } catch (InvalidQueryException e) {
+            // expected
+        }
     }
 
     public void testEqualTo() throws RepositoryException {



Mime
View raw message