You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by md...@apache.org on 2013/11/13 09:51:06 UTC
svn commit: r1541426 -
/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
Author: mduerig
Date: Wed Nov 13 08:51:06 2013
New Revision: 1541426
URL: http://svn.apache.org/r1541426
Log:
OAK-1174: Inconsistent handling of invalid names
@Ignored test case
Modified:
jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java?rev=1541426&r1=1541425&r2=1541426&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java Wed Nov 13 08:51:06 2013
@@ -23,6 +23,7 @@ import static org.apache.jackrabbit.comm
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -282,6 +283,27 @@ public class RepositoryTest extends Abst
}
@Test
+ @Ignore("OAK-1174") // FIXME OAK-1174
+ public void testInvalidName() throws RepositoryException {
+ Session session = getAdminSession();
+
+ RepositoryException exception = null;
+ try {
+ session.itemExists("/jcr:cont]ent");
+ } catch (RepositoryException e) {
+ exception = e;
+ }
+
+ session.setNamespacePrefix("foo", "http://foo.bar");
+ try {
+ session.itemExists("/jcr:cont]ent");
+ assertNull(exception);
+ } catch (RepositoryException e) {
+ assertNotNull(exception);
+ }
+ }
+
+ @Test
public void getNodeByIdentifier() throws RepositoryException {
Node node = getNode("/foo");
String id = node.getIdentifier();