jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1170579 - in /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test: java/org/apache/jackrabbit/spi2microkernel/QueryTest.java resources/queryPlans.txt
Date Wed, 14 Sep 2011 12:52:06 GMT
Author: mduerig
Date: Wed Sep 14 12:52:06 2011
New Revision: 1170579

URL: http://svn.apache.org/viewvc?rev=1170579&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP) 
name space test conflicts with name space used by TCK.

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/QueryTest.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/resources/queryPlans.txt

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/QueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/QueryTest.java?rev=1170579&r1=1170578&r2=1170579&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/QueryTest.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/QueryTest.java
Wed Sep 14 12:52:06 2011
@@ -13,12 +13,10 @@
  */
 package org.apache.jackrabbit.spi2microkernel;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import java.util.Collections;
-import java.util.Iterator;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
 import javax.imageio.spi.ServiceRegistry;
 import javax.jcr.Node;
 import javax.jcr.NodeIterator;
@@ -31,9 +29,13 @@ import javax.jcr.query.Query;
 import javax.jcr.query.QueryResult;
 import javax.jcr.query.Row;
 import javax.jcr.query.RowIterator;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import java.util.Collections;
+import java.util.Iterator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
 public class QueryTest {
     private static final String BASE_URL = "fs:target/repository-test/repository";
@@ -54,7 +56,7 @@ public class QueryTest {
     @Before
     public void setup() throws RepositoryException {
         Session s = getSession();
-        s.getWorkspace().getNamespaceRegistry().registerNamespace("test", "test");
+        s.getWorkspace().getNamespaceRegistry().registerNamespace("query-test", "query-test-uri");
         s.save();
     }
 
@@ -71,15 +73,15 @@ public class QueryTest {
         Session s = getSession();
         Node test;
         test = s.getRootNode().addNode("test");
-        test.setProperty("test:vanityPath", "/a");
-        test.setProperty("test:redirect", "/content/a");
+        test.setProperty("query-test:vanityPath", "/a");
+        test.setProperty("query-test:redirect", "/content/a");
         s.save();
         test = s.getRootNode().addNode("test2");
-        test.setProperty("test:vanityPath", "/b");
-        test.setProperty("test:redirect", "/content/a");
+        test.setProperty("query-test:vanityPath", "/b");
+        test.setProperty("query-test:redirect", "/content/a");
         s.save();
         Query q = s.getWorkspace().getQueryManager().createQuery(
-                "SELECT test:vanityPath, test:redirect FROM test:VanityPath", Query.JCR_SQL2);
+                "SELECT query-test:vanityPath, query-test:redirect FROM query-test:VanityPath",
Query.JCR_SQL2);
         QueryResult res = q.execute();
         NodeIterator it = res.getNodes();
         Node n = it.nextNode();

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/resources/queryPlans.txt
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/resources/queryPlans.txt?rev=1170579&r1=1170578&r2=1170579&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/resources/queryPlans.txt
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/resources/queryPlans.txt
Wed Sep 14 12:52:06 2011
@@ -1,12 +1,12 @@
 # vanity urls ======================
 index
-{test}vanityPath
+{query-test}vanityPath
 propertyIndex
 nonUnique
 
 plan
-SELECT test:vanityPath, test:redirect FROM test:VanityPath
-{test}vanityPath
+SELECT query-test:vanityPath, query-test:redirect FROM query-test:VanityPath
+{query-test}vanityPath
 
 testPath,redirect
 test:vanityPath,test:redirect



Mime
View raw message