You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by ju...@apache.org on 2010/10/06 18:35:02 UTC

svn commit: r1005111 - /jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/LoginLogoutTest.java

Author: jukka
Date: Wed Oct  6 16:35:01 2010
New Revision: 1005111

URL: http://svn.apache.org/viewvc?rev=1005111&view=rev
Log:
JCR-2695: Jackrabbit performance test suite

Modify the LoginLogutTest to also access the root node. This makes for a minimal somewhat useful session interaction (who wants to open a session for doing nothing!) and gives a more accurate picture of the performance even when the implementation uses lazy loading for internal session resources.

Modified:
    jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/LoginLogoutTest.java

Modified: jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/LoginLogoutTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/LoginLogoutTest.java?rev=1005111&r1=1005110&r2=1005111&view=diff
==============================================================================
--- jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/LoginLogoutTest.java (original)
+++ jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/LoginLogoutTest.java Wed Oct  6 16:35:01 2010
@@ -16,13 +16,21 @@
  */
 package org.apache.jackrabbit.performance;
 
+import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
+import javax.jcr.Session;
 
 public class LoginLogoutTest extends AbstractTest {
 
     public void runTest() throws RepositoryException {
+        Repository repository = getRepository();
         for (int i = 0; i < 1000; i++) {
-            getRepository().login().logout();
+            Session session = repository.login();
+            try {
+                session.getRootNode();
+            } finally {
+                session.logout();
+            }
         }
     }