jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1455064 - /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/tck/TCKBase.java
Date Mon, 11 Mar 2013 09:11:26 GMT
Author: mreutegg
Date: Mon Mar 11 09:11:25 2013
New Revision: 1455064

URL: http://svn.apache.org/r1455064
Log:
OAK-682: Run Oak-Jcr tests using the new MongoMK prototype
- use new RepositoryHelperPool.borrowHelpers() method to drain pool

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/tck/TCKBase.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/tck/TCKBase.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/tck/TCKBase.java?rev=1455064&r1=1455063&r2=1455064&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/tck/TCKBase.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/tck/TCKBase.java
Mon Mar 11 09:11:25 2013
@@ -24,6 +24,7 @@ import org.apache.jackrabbit.oak.jcr.Oak
 import org.apache.jackrabbit.test.AbstractJCRTest;
 import org.apache.jackrabbit.test.RepositoryHelper;
 import org.apache.jackrabbit.test.RepositoryHelperPool;
+import org.apache.jackrabbit.test.RepositoryHelperPoolImpl;
 import org.apache.jackrabbit.test.RepositoryStub;
 import org.slf4j.bridge.SLF4JBridgeHandler;
 
@@ -73,10 +74,10 @@ public abstract class TCKBase extends Te
 
         public void testSetup() throws Exception {
             // replace the existing helper with our parametrized version
-            Field poolField = AbstractJCRTest.class.getDeclaredField("HELPER_POOL");
-            poolField.setAccessible(true);
-            RepositoryHelperPool helperPool = (RepositoryHelperPool) poolField.get(null);
-            helperPool.borrowHelper();
+            RepositoryHelperPool helperPool = RepositoryHelperPoolImpl.getInstance();
+            // drain helpers
+            helperPool.borrowHelpers();
+            // replace with our own stub
             Properties props = new Properties();
             props.load(getClass().getClassLoader().getResourceAsStream(RepositoryStub.STUB_IMPL_PROPS));
             props.put(RepositoryStub.PROP_STUB_IMPL_CLASS, stubClass);



Mime
View raw message