jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1531879 - in /jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark: DescendantSearchTest.java SQL2DescendantSearchTest.java SetPropertyTest.java
Date Mon, 14 Oct 2013 12:57:58 GMT
Author: thomasm
Date: Mon Oct 14 12:57:57 2013
New Revision: 1531879

URL: http://svn.apache.org/r1531879
Log:
OAK-641: Improved benchmark tooling - use a different node name each time

Modified:
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/DescendantSearchTest.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SQL2DescendantSearchTest.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SetPropertyTest.java

Modified: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/DescendantSearchTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/DescendantSearchTest.java?rev=1531879&r1=1531878&r2=1531879&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/DescendantSearchTest.java
(original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/DescendantSearchTest.java
Mon Oct 14 12:57:57 2013
@@ -35,19 +35,21 @@ public class DescendantSearchTest extend
     private Session session;
 
     private Node root;
+    
+    String testNodeName = "test" + TEST_ID;
 
     protected Query createQuery(QueryManager manager, int i)
             throws RepositoryException {
         @SuppressWarnings("deprecation")
         String xpath = Query.XPATH;
-        return manager.createQuery("/jcr:root/testroot//element(*,nt:base)[@testcount=" +
i + "]", xpath);
+        return manager.createQuery("/jcr:root/" + testNodeName + "//element(*,nt:base)[@testcount="
+ i + "]", xpath);
     }
 
     @Override
     public void beforeSuite() throws RepositoryException {
         session = getRepository().login(getCredentials());
 
-        root = session.getRootNode().addNode("testroot", "nt:unstructured");
+        root = session.getRootNode().addNode(testNodeName, "nt:unstructured");
         for (int i = 0; i < NODE_COUNT; i++) {
             Node node = root.addNode("node" + i, "nt:unstructured");
             for (int j = 0; j < NODE_COUNT; j++) {

Modified: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SQL2DescendantSearchTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SQL2DescendantSearchTest.java?rev=1531879&r1=1531878&r2=1531879&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SQL2DescendantSearchTest.java
(original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SQL2DescendantSearchTest.java
Mon Oct 14 12:57:57 2013
@@ -29,7 +29,7 @@ public class SQL2DescendantSearchTest ex
     protected Query createQuery(QueryManager manager, int i)
             throws RepositoryException {
         return manager.createQuery(
-                "SELECT * FROM [nt:base] AS n WHERE ISDESCENDANTNODE(n, '/testroot') AND
testcount=" + i,
+                "SELECT * FROM [nt:base] AS n WHERE ISDESCENDANTNODE(n, '/" + testNodeName
+"') AND testcount=" + i,
                 "JCR-SQL2");
     }
 

Modified: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SetPropertyTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SetPropertyTest.java?rev=1531879&r1=1531878&r2=1531879&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SetPropertyTest.java
(original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/SetPropertyTest.java
Mon Oct 14 12:57:57 2013
@@ -29,11 +29,13 @@ public class SetPropertyTest extends Abs
     private Session session;
 
     private Node node;
+    
+    String testNodeName = "test" + TEST_ID;
 
     @Override
     public void beforeSuite() throws RepositoryException {
         session = getRepository().login(getCredentials());
-        node = session.getRootNode().addNode("testnode", "nt:unstructured");
+        node = session.getRootNode().addNode(testNodeName, "nt:unstructured");
         session.save();
     }
 
@@ -57,7 +59,7 @@ public class SetPropertyTest extends Abs
 
     @Override
     public void afterSuite() throws RepositoryException {
-        session.getRootNode().getNode("testnode").remove();
+        session.getRootNode().getNode(testNodeName).remove();
         session.save();
         session.logout();
     }



Mime
View raw message