jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1453313 - in /jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture: JackrabbitRepositoryFixture.java OakRepositoryFixture.java
Date Wed, 06 Mar 2013 12:38:49 GMT
Author: jukka
Date: Wed Mar  6 12:38:48 2013
New Revision: 1453313

URL: http://svn.apache.org/r1453313
Log:
OAK-641: Improved benchmark tooling

Fix Jackrabbit 2.x setup code

Modified:
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/JackrabbitRepositoryFixture.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java

Modified: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/JackrabbitRepositoryFixture.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/JackrabbitRepositoryFixture.java?rev=1453313&r1=1453312&r2=1453313&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/JackrabbitRepositoryFixture.java
(original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/JackrabbitRepositoryFixture.java
Wed Mar  6 12:38:48 2013
@@ -36,12 +36,12 @@ public class JackrabbitRepositoryFixture
     @Override
     public Repository[] setUpCluster(int n) throws Exception {
         if (n == 1) {
-            Repository[] cluster = new Repository[n];
-            File directory = new File("jackrabbit-repository");
+            String name = "Jackrabbit-" + System.currentTimeMillis();
+            File directory = new File(name);
             RepositoryConfig config = RepositoryConfig.install(directory);
-            this.cluster[0] = RepositoryImpl.create(config);
-            cluster[0] = this.cluster[0];
-            return cluster;
+            RepositoryImpl repository = RepositoryImpl.create(config);
+            this.cluster = new RepositoryImpl[] { repository };
+            return new Repository[] { repository };
         } else {
             throw new UnsupportedOperationException("TODO");
         }
@@ -61,4 +61,9 @@ public class JackrabbitRepositoryFixture
         }
     }
 
+    @Override
+    public String toString() {
+        return "Jackrabbit";
+    }
+
 }

Modified: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java?rev=1453313&r1=1453312&r2=1453313&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java
(original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java
Wed Mar  6 12:38:48 2013
@@ -153,6 +153,7 @@ public abstract class OakRepositoryFixtu
     public void tearDownCluster() {
     }
 
+    @Override
     public String toString() {
         return name;
     }



Mime
View raw message