jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1163543 - in /jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance: AbstractTest.java BigFileReadTest.java BigFileWriteTest.java
Date Wed, 31 Aug 2011 09:14:48 GMT
Author: jukka
Date: Wed Aug 31 09:14:48 2011
New Revision: 1163543

URL: http://svn.apache.org/viewvc?rev=1163543&view=rev
Log:
test/performance: Prevent the big file performance tests from running on Jackrabbit 1.[4-6]
where we have a massive performance problem with the default configuration

Modified:
    jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractTest.java
    jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/BigFileReadTest.java
    jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/BigFileWriteTest.java

Modified: jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractTest.java?rev=1163543&r1=1163542&r2=1163543&view=diff
==============================================================================
--- jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractTest.java
(original)
+++ jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractTest.java
Wed Aug 31 09:14:48 2011
@@ -133,6 +133,19 @@ public abstract class AbstractTest {
     protected void afterSuite() throws Exception {
     }
 
+    protected void failOnRepositoryVersions(String... versions)
+            throws RepositoryException {
+        String repositoryVersion =
+                repository.getDescriptor(Repository.REP_VERSION_DESC);
+        for (String version : versions) {
+            if (repositoryVersion.startsWith(version)) {
+                throw new RepositoryException(
+                        "Unable to run " + getClass().getName()
+                        + " on repository version " + version);
+            }
+        }
+    }
+
     protected Repository getRepository() {
         return repository;
     }

Modified: jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/BigFileReadTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/BigFileReadTest.java?rev=1163543&r1=1163542&r2=1163543&view=diff
==============================================================================
--- jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/BigFileReadTest.java
(original)
+++ jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/BigFileReadTest.java
Wed Aug 31 09:14:48 2011
@@ -39,7 +39,9 @@ public class BigFileReadTest extends Abs
     private int i = 0;
 
     public void beforeSuite() throws RepositoryException {
-        session = getRepository().login(getCredentials());
+        failOnRepositoryVersions("1.4", "1.5", "1.6");
+
+        session = loginWriter();
 
         root = session.getRootNode().addNode(
                 "BigFileReadTest", "nt:folder");
@@ -68,7 +70,6 @@ public class BigFileReadTest extends Abs
     public void afterSuite() throws RepositoryException {
         root.remove();
         session.save();
-        session.logout();
     }
 
 }

Modified: jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/BigFileWriteTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/BigFileWriteTest.java?rev=1163543&r1=1163542&r2=1163543&view=diff
==============================================================================
--- jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/BigFileWriteTest.java
(original)
+++ jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/BigFileWriteTest.java
Wed Aug 31 09:14:48 2011
@@ -31,6 +31,8 @@ public class BigFileWriteTest extends Ab
     private Node file;
 
     public void beforeSuite() throws RepositoryException {
+        failOnRepositoryVersions("1.4", "1.5", "1.6");
+
         session = loginWriter();
     }
 



Mime
View raw message