cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1385283 - in /cayenne/main/trunk: build-tools/cayenne-test-utilities/src/main/java/org/apache/cayenne/test/parallel/ framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/ framework/cayenne-jdk1.5-unpublished/src/test/java/...
Date Sun, 16 Sep 2012 15:16:53 GMT
Author: aadamchik
Date: Sun Sep 16 15:16:52 2012
New Revision: 1385283

URL: http://svn.apache.org/viewvc?rev=1385283&view=rev
Log:
test uti refactoring - moving ThreadedTestHelper to cayenne-test-utilities

Added:
    cayenne/main/trunk/build-tools/cayenne-test-utilities/src/main/java/org/apache/cayenne/test/parallel/
    cayenne/main/trunk/build-tools/cayenne-test-utilities/src/main/java/org/apache/cayenne/test/parallel/ParallelTestContainer.java
      - copied, changed from r1385281, cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/unit/util/ThreadedTestHelper.java
Removed:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/unit/util/ThreadedTestHelper.java
Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextWithDataContextTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDataChannelEventsTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDelegateSharedCacheTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSharedCacheEmpiricTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSharedCacheTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentEventsTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentPeerEventsTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextPeerEventsTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContext_DeadlockTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreGCTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/SoftDeleteBatchQueryBuilderTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/event/DefaultEventManagerTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/event/EventBridgeTest.java

Copied: cayenne/main/trunk/build-tools/cayenne-test-utilities/src/main/java/org/apache/cayenne/test/parallel/ParallelTestContainer.java (from r1385281, cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/unit/util/ThreadedTestHelper.java)
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/build-tools/cayenne-test-utilities/src/main/java/org/apache/cayenne/test/parallel/ParallelTestContainer.java?p2=cayenne/main/trunk/build-tools/cayenne-test-utilities/src/main/java/org/apache/cayenne/test/parallel/ParallelTestContainer.java&p1=cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/unit/util/ThreadedTestHelper.java&r1=1385281&r2=1385283&rev=1385283&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/unit/util/ThreadedTestHelper.java (original)
+++ cayenne/main/trunk/build-tools/cayenne-test-utilities/src/main/java/org/apache/cayenne/test/parallel/ParallelTestContainer.java Sun Sep 16 15:16:52 2012
@@ -17,7 +17,7 @@
  *  under the License.
  ****************************************************************/
 
-package org.apache.cayenne.unit.util;
+package org.apache.cayenne.test.parallel;
 
 /**
  * Helper class allowing unit tests to wait till a code in question executes in
@@ -32,11 +32,11 @@ package org.apache.cayenne.unit.util;
  * </p>
  * 
  */
-public abstract class ThreadedTestHelper {
+public abstract class ParallelTestContainer {
 
 	protected abstract void assertResult() throws Exception;
 
-	public void assertWithTimeout(long timeoutMs) throws Exception {
+	public void runTest(long timeoutMs) throws Exception {
 		long checkEveryXMs;
 		int maxMumberOfChecks;
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextWithDataContextTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextWithDataContextTest.java?rev=1385283&r1=1385282&r2=1385283&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextWithDataContextTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextWithDataContextTest.java Sun Sep 16 15:16:52 2012
@@ -35,6 +35,7 @@ import org.apache.cayenne.reflect.Lifecy
 import org.apache.cayenne.remote.RemoteIncrementalFaultList;
 import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.test.jdbc.TableHelper;
+import org.apache.cayenne.test.parallel.ParallelTestContainer;
 import org.apache.cayenne.testdo.mt.ClientMtMeaningfulPk;
 import org.apache.cayenne.testdo.mt.ClientMtReflexive;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
@@ -45,7 +46,6 @@ import org.apache.cayenne.unit.di.DataCh
 import org.apache.cayenne.unit.di.UnitTestClosure;
 import org.apache.cayenne.unit.di.client.ClientCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
-import org.apache.cayenne.unit.util.ThreadedTestHelper;
 
 @UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
 public class CayenneContextWithDataContextTest extends ClientCase {
@@ -215,7 +215,7 @@ public class CayenneContextWithDataConte
             final Persistent clientObject = clientContext.newObject(ClientMtTable1.class);
             clientContext.commitChanges();
 
-        new ThreadedTestHelper() {
+        new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
@@ -226,7 +226,7 @@ public class CayenneContextWithDataConte
             	assertNotNull(peer);
             	assertTrue(peer.isPrePersisted());
             }
-        }.assertWithTimeout(1000);
+        }.runTest(1000);
 
 
         }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDataChannelEventsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDataChannelEventsTest.java?rev=1385283&r1=1385282&r2=1385283&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDataChannelEventsTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDataChannelEventsTest.java Sun Sep 16 15:16:52 2012
@@ -25,10 +25,10 @@ import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.configuration.server.ServerRuntime;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.graph.GraphEvent;
+import org.apache.cayenne.test.parallel.ParallelTestContainer;
 import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
-import org.apache.cayenne.unit.util.ThreadedTestHelper;
 import org.apache.cayenne.util.EventUtil;
 
 /**
@@ -57,7 +57,7 @@ public class DataContextDataChannelEvent
         a.setArtistName("Y");
         context.commitChanges();
 
-        new ThreadedTestHelper() {
+        new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
@@ -65,7 +65,7 @@ public class DataContextDataChannelEvent
                 assertFalse(listener.graphChanged);
                 assertFalse(listener.graphRolledBack);
             }
-        }.assertWithTimeout(1000);
+        }.runTest(1000);
 
     }
 
@@ -80,7 +80,7 @@ public class DataContextDataChannelEvent
         a.setArtistName("Y");
         context.rollbackChanges();
 
-        new ThreadedTestHelper() {
+        new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
@@ -88,7 +88,7 @@ public class DataContextDataChannelEvent
                 assertFalse(listener.graphChanged);
                 assertTrue(listener.graphRolledBack);
             }
-        }.assertWithTimeout(1000);
+        }.runTest(1000);
     }
 
     public void testChangeEventOnChildChange() throws Exception {
@@ -106,7 +106,7 @@ public class DataContextDataChannelEvent
         a1.setArtistName("Y");
         childContext.commitChangesToParent();
 
-        new ThreadedTestHelper() {
+        new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
@@ -114,7 +114,7 @@ public class DataContextDataChannelEvent
                 assertTrue(listener.graphChanged);
                 assertFalse(listener.graphRolledBack);
             }
-        }.assertWithTimeout(1000);
+        }.runTest(1000);
     }
 
     public void testChangeEventOnPeerChange() throws Exception {
@@ -130,7 +130,7 @@ public class DataContextDataChannelEvent
         a1.setArtistName("Y");
         peer.commitChangesToParent();
 
-        new ThreadedTestHelper() {
+        new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
@@ -138,7 +138,7 @@ public class DataContextDataChannelEvent
                 assertTrue(listener.graphChanged);
                 assertFalse(listener.graphRolledBack);
             }
-        }.assertWithTimeout(1000);
+        }.runTest(1000);
     }
 
     public void testChangeEventOnPeerChangeSecondNestingLevel() throws Exception {
@@ -158,7 +158,7 @@ public class DataContextDataChannelEvent
         a1.setArtistName("Y");
         childPeer2.commitChangesToParent();
 
-        new ThreadedTestHelper() {
+        new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
@@ -166,7 +166,7 @@ public class DataContextDataChannelEvent
                 assertTrue(listener.graphChanged);
                 assertFalse(listener.graphRolledBack);
             }
-        }.assertWithTimeout(1000);
+        }.runTest(1000);
     }
 
     class MockChannelListener implements DataChannelListener {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDelegateSharedCacheTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDelegateSharedCacheTest.java?rev=1385283&r1=1385282&r2=1385283&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDelegateSharedCacheTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDelegateSharedCacheTest.java Sun Sep 16 15:16:52 2012
@@ -25,10 +25,10 @@ import org.apache.cayenne.DataObject;
 import org.apache.cayenne.DataRow;
 import org.apache.cayenne.PersistenceState;
 import org.apache.cayenne.di.Inject;
+import org.apache.cayenne.test.parallel.ParallelTestContainer;
 import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
-import org.apache.cayenne.unit.util.ThreadedTestHelper;
 
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
 public class DataContextDelegateSharedCacheTest extends ServerCase {
@@ -83,14 +83,14 @@ public class DataContextDelegateSharedCa
 
         // assert that delegate was consulted when an object store
         // was refreshed
-        ThreadedTestHelper helper = new ThreadedTestHelper() {
+        ParallelTestContainer helper = new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
                 assertTrue("Delegate was not consulted", methodInvoked[0]);
             }
         };
-        helper.assertWithTimeout(3000);
+        helper.runTest(3000);
     }
 
     /**
@@ -159,14 +159,14 @@ public class DataContextDelegateSharedCa
 
         // assert that delegate was consulted when an object store
         // was refreshed
-        ThreadedTestHelper helper = new ThreadedTestHelper() {
+        ParallelTestContainer helper = new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
                 assertTrue("Delegate was not consulted", methodInvoked[0]);
             }
         };
-        helper.assertWithTimeout(3000);
+        helper.runTest(3000);
     }
 
     /**
@@ -202,14 +202,14 @@ public class DataContextDelegateSharedCa
 
         // assert that delegate was consulted when an object store
         // was refreshed, and actually blocked object expulsion
-        ThreadedTestHelper helper = new ThreadedTestHelper() {
+        ParallelTestContainer helper = new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
                 assertTrue("Delegate was not consulted", methodInvoked[0]);
             }
         };
-        helper.assertWithTimeout(3000);
+        helper.runTest(3000);
         assertEquals(PersistenceState.COMMITTED, altArtist.getPersistenceState());
         assertNotNull(altArtist.getObjectContext());
     }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSharedCacheEmpiricTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSharedCacheEmpiricTest.java?rev=1385283&r1=1385282&r2=1385283&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSharedCacheEmpiricTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSharedCacheEmpiricTest.java Sun Sep 16 15:16:52 2012
@@ -30,10 +30,10 @@ import org.apache.cayenne.event.DefaultE
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.test.jdbc.TableHelper;
+import org.apache.cayenne.test.parallel.ParallelTestContainer;
 import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
-import org.apache.cayenne.unit.util.ThreadedTestHelper;
 
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
 public class DataContextSharedCacheEmpiricTest extends ServerCase {
@@ -144,7 +144,7 @@ public class DataContextSharedCacheEmpir
         assertEquals(NEW_NAME, freshSnapshot.get("ARTIST_NAME"));
 
         // check peer artist
-        ThreadedTestHelper helper = new ThreadedTestHelper() {
+        ParallelTestContainer helper = new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
@@ -154,6 +154,6 @@ public class DataContextSharedCacheEmpir
                         a2.getArtistName());
             }
         };
-        helper.assertWithTimeout(3000);
+        helper.runTest(3000);
     }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSharedCacheTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSharedCacheTest.java?rev=1385283&r1=1385282&r2=1385283&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSharedCacheTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSharedCacheTest.java Sun Sep 16 15:16:52 2012
@@ -34,12 +34,12 @@ import org.apache.cayenne.exp.Expression
 import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.test.jdbc.DBHelper;
+import org.apache.cayenne.test.parallel.ParallelTestContainer;
 import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.testdo.testmap.Painting;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.apache.cayenne.unit.util.SQLTemplateCustomizer;
-import org.apache.cayenne.unit.util.ThreadedTestHelper;
 
 /**
  * Test suite for testing behavior of multiple DataContexts that share the same underlying
@@ -118,7 +118,7 @@ public class DataContextSharedCacheTest 
         // check both artists
         assertEquals(newName, altArtist.getArtistName());
 
-        ThreadedTestHelper helper = new ThreadedTestHelper() {
+        ParallelTestContainer helper = new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
@@ -128,7 +128,7 @@ public class DataContextSharedCacheTest 
                         artist.getArtistName());
             }
         };
-        helper.assertWithTimeout(3000);
+        helper.runTest(3000);
     }
 
     /**
@@ -162,14 +162,14 @@ public class DataContextSharedCacheTest 
         assertEquals(newName, freshSnapshot.get("ARTIST_NAME"));
 
         // check peer artist
-        ThreadedTestHelper helper = new ThreadedTestHelper() {
+        ParallelTestContainer helper = new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
                 assertEquals(newName, altArtist.getArtistName());
             }
         };
-        helper.assertWithTimeout(3000);
+        helper.runTest(3000);
     }
 
     /**
@@ -210,7 +210,7 @@ public class DataContextSharedCacheTest 
         assertEquals(newDate, freshSnapshot.get("DATE_OF_BIRTH"));
 
         // check peer artist
-        ThreadedTestHelper helper = new ThreadedTestHelper() {
+        ParallelTestContainer helper = new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
@@ -219,7 +219,7 @@ public class DataContextSharedCacheTest 
                 assertEquals(PersistenceState.MODIFIED, altArtist.getPersistenceState());
             }
         };
-        helper.assertWithTimeout(3000);
+        helper.runTest(3000);
 
     }
 
@@ -249,7 +249,7 @@ public class DataContextSharedCacheTest 
                 .getCachedSnapshot(altArtist.getObjectId()));
 
         // check peer artist
-        ThreadedTestHelper helper = new ThreadedTestHelper() {
+        ParallelTestContainer helper = new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
@@ -257,7 +257,7 @@ public class DataContextSharedCacheTest 
                 assertNull(altArtist.getObjectContext());
             }
         };
-        helper.assertWithTimeout(3000);
+        helper.runTest(3000);
     }
 
     /**
@@ -286,7 +286,7 @@ public class DataContextSharedCacheTest 
                 .getCachedSnapshot(altArtist.getObjectId()));
 
         // check peer artist
-        ThreadedTestHelper helper = new ThreadedTestHelper() {
+        ParallelTestContainer helper = new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
@@ -294,7 +294,7 @@ public class DataContextSharedCacheTest 
                 assertNull(altArtist.getObjectContext());
             }
         };
-        helper.assertWithTimeout(3000);
+        helper.runTest(3000);
     }
 
     /**
@@ -326,14 +326,14 @@ public class DataContextSharedCacheTest 
                 .getCachedSnapshot(altArtist.getObjectId()));
 
         // check peer artist
-        ThreadedTestHelper helper = new ThreadedTestHelper() {
+        ParallelTestContainer helper = new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
                 assertEquals(PersistenceState.NEW, altArtist.getPersistenceState());
             }
         };
-        helper.assertWithTimeout(3000);
+        helper.runTest(3000);
 
         // check if now we can save this object again, and with the original
         // ObjectId
@@ -377,7 +377,7 @@ public class DataContextSharedCacheTest 
                 .getCachedSnapshot(altArtist.getObjectId()));
 
         // check peer artist
-        ThreadedTestHelper helper = new ThreadedTestHelper() {
+        ParallelTestContainer helper = new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
@@ -385,7 +385,7 @@ public class DataContextSharedCacheTest 
                 assertNull(altArtist.getObjectContext());
             }
         };
-        helper.assertWithTimeout(3000);
+        helper.runTest(3000);
 
         assertFalse(context1.hasChanges());
     }
@@ -441,7 +441,7 @@ public class DataContextSharedCacheTest 
                 .getCachedSnapshot(painting1.getObjectId()));
 
         // check peer artist
-        ThreadedTestHelper helper = new ThreadedTestHelper() {
+        ParallelTestContainer helper = new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
@@ -455,7 +455,7 @@ public class DataContextSharedCacheTest 
                 assertFalse(list.contains(altPainting1));
             }
         };
-        helper.assertWithTimeout(3000);
+        helper.runTest(3000);
     }
 
     /**
@@ -496,7 +496,7 @@ public class DataContextSharedCacheTest 
 
         // use threaded helper as a barrier, to avoid triggering faults earlier than
         // needed
-        ThreadedTestHelper helper = new ThreadedTestHelper() {
+        ParallelTestContainer helper = new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
@@ -505,7 +505,7 @@ public class DataContextSharedCacheTest 
                 assertTrue(((ToManyList) value).isFault());
             }
         };
-        helper.assertWithTimeout(2000);
+        helper.runTest(2000);
         List<Painting> list = altArtist.getPaintingArray();
         assertEquals(2, list.size());
     }
@@ -596,7 +596,7 @@ public class DataContextSharedCacheTest 
                 .getCachedSnapshot(artist.getObjectId()));
 
         // alternate context
-        new ThreadedTestHelper() {
+        new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
@@ -606,7 +606,7 @@ public class DataContextSharedCacheTest 
                         .getDataRowCache()
                         .getCachedSnapshot(altArtist.getObjectId()));
             }
-        }.assertWithTimeout(5000);
+        }.runTest(5000);
 
         // resolve object
         assertEquals(originalName, altArtist.getArtistName());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentEventsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentEventsTest.java?rev=1385283&r1=1385282&r2=1385283&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentEventsTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentEventsTest.java Sun Sep 16 15:16:52 2012
@@ -22,10 +22,10 @@ package org.apache.cayenne.access;
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.configuration.server.ServerRuntime;
 import org.apache.cayenne.di.Inject;
+import org.apache.cayenne.test.parallel.ParallelTestContainer;
 import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
-import org.apache.cayenne.unit.util.ThreadedTestHelper;
 
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
 public class NestedDataContextParentEventsTest extends ServerCase {
@@ -49,13 +49,13 @@ public class NestedDataContextParentEven
         assertTrue(ap.getObjectId().isTemporary());
         context.commitChanges();
 
-        new ThreadedTestHelper() {
+        new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
                 assertFalse(ap.getObjectId().isTemporary());
                 assertEquals(ap.getObjectId(), ac.getObjectId());
             }
-        }.assertWithTimeout(1000);
+        }.runTest(1000);
     }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentPeerEventsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentPeerEventsTest.java?rev=1385283&r1=1385282&r2=1385283&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentPeerEventsTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentPeerEventsTest.java Sun Sep 16 15:16:52 2012
@@ -22,11 +22,11 @@ package org.apache.cayenne.access;
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.configuration.server.ServerRuntime;
 import org.apache.cayenne.di.Inject;
+import org.apache.cayenne.test.parallel.ParallelTestContainer;
 import org.apache.cayenne.testdo.relationship.Child;
 import org.apache.cayenne.testdo.relationship.Master;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
-import org.apache.cayenne.unit.util.ThreadedTestHelper;
 
 @UseServerRuntime(ServerCase.RELATIONSHIPS_PROJECT)
 public class NestedDataContextParentPeerEventsTest extends ServerCase {
@@ -54,7 +54,7 @@ public class NestedDataContextParentPeer
         assertEquals("X", a2.getName());
         parentContext2.commitChangesToParent();
 
-        new ThreadedTestHelper() {
+        new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
@@ -64,7 +64,7 @@ public class NestedDataContextParentPeer
                         "Peer data context became dirty on event processing",
                         child.hasChanges());
             }
-        }.assertWithTimeout(2000);
+        }.runTest(2000);
     }
 
     public void testPeerObjectUpdatedToOneRelationship() throws Exception {
@@ -90,7 +90,7 @@ public class NestedDataContextParentPeer
         assertNotSame(altA2, p2.getMaster());
         parentContext2.commitChanges();
 
-        new ThreadedTestHelper() {
+        new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
@@ -99,7 +99,7 @@ public class NestedDataContextParentPeer
                         "Peer data context became dirty on event processing",
                         childContext1.hasChanges());
             }
-        }.assertWithTimeout(2000);
+        }.runTest(2000);
     }
 
     public void testPeerObjectUpdatedToManyRelationship() throws Exception {
@@ -125,7 +125,7 @@ public class NestedDataContextParentPeer
         assertFalse(a2.getChildren().contains(py2));
         parentContext2.commitChangesToParent();
 
-        new ThreadedTestHelper() {
+        new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
@@ -136,6 +136,6 @@ public class NestedDataContextParentPeer
                         "Peer data context became dirty on event processing",
                         peer2.hasChanges());
             }
-        }.assertWithTimeout(2000);
+        }.runTest(2000);
     }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextPeerEventsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextPeerEventsTest.java?rev=1385283&r1=1385282&r2=1385283&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextPeerEventsTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextPeerEventsTest.java Sun Sep 16 15:16:52 2012
@@ -23,159 +23,159 @@ import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.ObjectId;
 import org.apache.cayenne.configuration.server.ServerRuntime;
 import org.apache.cayenne.di.Inject;
+import org.apache.cayenne.test.parallel.ParallelTestContainer;
 import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.testdo.testmap.Painting;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
-import org.apache.cayenne.unit.util.ThreadedTestHelper;
 
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
 public class NestedDataContextPeerEventsTest extends ServerCase {
 
-    @Inject
-    private DataContext context;
+	@Inject
+	private DataContext context;
 
-    @Inject
-    private ServerRuntime runtime;
+	@Inject
+	private ServerRuntime runtime;
 
-    public void testPeerObjectUpdatedTempOID() throws Exception {
+	public void testPeerObjectUpdatedTempOID() throws Exception {
 
-        ObjectContext peer1 = runtime.getContext(context);
-        final Artist a1 = peer1.newObject(Artist.class);
-        a1.setArtistName("Y");
+		ObjectContext peer1 = runtime.getContext(context);
+		final Artist a1 = peer1.newObject(Artist.class);
+		a1.setArtistName("Y");
 
-        ObjectId a1TempId = a1.getObjectId();
-        assertTrue(a1TempId.isTemporary());
+		ObjectId a1TempId = a1.getObjectId();
+		assertTrue(a1TempId.isTemporary());
 
-        ObjectContext peer2 = runtime.getContext(context);
-        final Artist a2 = peer2.localObject(a1);
+		ObjectContext peer2 = runtime.getContext(context);
+		final Artist a2 = peer2.localObject(a1);
 
-        assertEquals(a1TempId, a2.getObjectId());
+		assertEquals(a1TempId, a2.getObjectId());
 
-        peer1.commitChanges();
+		peer1.commitChanges();
 
-        // pause to let the context events propagate
-        new ThreadedTestHelper() {
+		// pause to let the context events propagate
+		new ParallelTestContainer() {
 
-            @Override
-            protected void assertResult() throws Exception {
-                assertFalse(a1.getObjectId().isTemporary());
-                assertFalse(a2.getObjectId().isTemporary());
-                assertEquals(a2.getObjectId(), a1.getObjectId());
-            }
-        }.assertWithTimeout(2000);
-    }
+			@Override
+			protected void assertResult() throws Exception {
+				assertFalse(a1.getObjectId().isTemporary());
+				assertFalse(a2.getObjectId().isTemporary());
+				assertEquals(a2.getObjectId(), a1.getObjectId());
+			}
+		}.runTest(2000);
+	}
 
-    public void testPeerObjectUpdatedSimpleProperty() throws Exception {
-        Artist a = context.newObject(Artist.class);
-        a.setArtistName("X");
-        context.commitChanges();
+	public void testPeerObjectUpdatedSimpleProperty() throws Exception {
+		Artist a = context.newObject(Artist.class);
+		a.setArtistName("X");
+		context.commitChanges();
 
-        ObjectContext peer1 = runtime.getContext(context);
-        Artist a1 = peer1.localObject(a);
+		ObjectContext peer1 = runtime.getContext(context);
+		Artist a1 = peer1.localObject(a);
 
-        final ObjectContext peer2 = runtime.getContext(context);
-        final Artist a2 = peer2.localObject(a);
+		final ObjectContext peer2 = runtime.getContext(context);
+		final Artist a2 = peer2.localObject(a);
 
-        a1.setArtistName("Y");
-        assertEquals("X", a2.getArtistName());
-        peer1.commitChangesToParent();
+		a1.setArtistName("Y");
+		assertEquals("X", a2.getArtistName());
+		peer1.commitChangesToParent();
 
-        // pause to let the context events propagate
-        new ThreadedTestHelper() {
+		// pause to let the context events propagate
+		new ParallelTestContainer() {
 
-            @Override
-            protected void assertResult() throws Exception {
-                assertEquals("Y", a2.getArtistName());
-                assertFalse(
-                        "Peer data context became dirty on event processing",
-                        peer2.hasChanges());
-            }
-        }.assertWithTimeout(2000);
+			@Override
+			protected void assertResult() throws Exception {
+				assertEquals("Y", a2.getArtistName());
+				assertFalse(
+						"Peer data context became dirty on event processing",
+						peer2.hasChanges());
+			}
+		}.runTest(2000);
 
-    }
+	}
 
-    public void testPeerObjectUpdatedToOneRelationship() throws Exception {
+	public void testPeerObjectUpdatedToOneRelationship() throws Exception {
 
-        Artist a = context.newObject(Artist.class);
-        Artist altA = context.newObject(Artist.class);
+		Artist a = context.newObject(Artist.class);
+		Artist altA = context.newObject(Artist.class);
 
-        Painting p = context.newObject(Painting.class);
-        p.setToArtist(a);
-        p.setPaintingTitle("PPP");
-        a.setArtistName("X");
-        altA.setArtistName("Y");
-        context.commitChanges();
+		Painting p = context.newObject(Painting.class);
+		p.setToArtist(a);
+		p.setPaintingTitle("PPP");
+		a.setArtistName("X");
+		altA.setArtistName("Y");
+		context.commitChanges();
 
-        ObjectContext peer1 = runtime.getContext(context);
-        Painting p1 = peer1.localObject(p);
-        Artist altA1 = peer1.localObject(altA);
+		ObjectContext peer1 = runtime.getContext(context);
+		Painting p1 = peer1.localObject(p);
+		Artist altA1 = peer1.localObject(altA);
 
-        final ObjectContext peer2 = runtime.getContext(context);
-        final Painting p2 = peer2.localObject(p);
-        final Artist altA2 = peer2.localObject(altA);
-        Artist a2 = peer2.localObject(a);
+		final ObjectContext peer2 = runtime.getContext(context);
+		final Painting p2 = peer2.localObject(p);
+		final Artist altA2 = peer2.localObject(altA);
+		Artist a2 = peer2.localObject(a);
 
-        p1.setToArtist(altA1);
-        assertSame(a2, p2.getToArtist());
-        peer1.commitChangesToParent();
+		p1.setToArtist(altA1);
+		assertSame(a2, p2.getToArtist());
+		peer1.commitChangesToParent();
 
-        // pause to let the context events propagate
-        new ThreadedTestHelper() {
+		// pause to let the context events propagate
+		new ParallelTestContainer() {
 
-            @Override
-            protected void assertResult() throws Exception {
-                assertEquals(altA2, p2.getToArtist());
+			@Override
+			protected void assertResult() throws Exception {
+				assertEquals(altA2, p2.getToArtist());
 
-                assertFalse(
-                        "Peer data context became dirty on event processing",
-                        peer2.hasChanges());
-            }
-        }.assertWithTimeout(2000);
+				assertFalse(
+						"Peer data context became dirty on event processing",
+						peer2.hasChanges());
+			}
+		}.runTest(2000);
 
-    }
+	}
 
-    public void testPeerObjectUpdatedToManyRelationship() throws Exception {
+	public void testPeerObjectUpdatedToManyRelationship() throws Exception {
 
-        Artist a = context.newObject(Artist.class);
-        a.setArtistName("X");
+		Artist a = context.newObject(Artist.class);
+		a.setArtistName("X");
 
-        Painting px = context.newObject(Painting.class);
-        px.setToArtist(a);
-        px.setPaintingTitle("PX");
+		Painting px = context.newObject(Painting.class);
+		px.setToArtist(a);
+		px.setPaintingTitle("PX");
 
-        Painting py = context.newObject(Painting.class);
-        py.setPaintingTitle("PY");
+		Painting py = context.newObject(Painting.class);
+		py.setPaintingTitle("PY");
 
-        context.commitChanges();
-        // pause to let the context events propagate
-        Thread.sleep(500);
+		context.commitChanges();
+		// pause to let the context events propagate
+		Thread.sleep(500);
 
-        ObjectContext peer1 = runtime.getContext(context);
-        Painting py1 = peer1.localObject(py);
-        Artist a1 = peer1.localObject(a);
+		ObjectContext peer1 = runtime.getContext(context);
+		Painting py1 = peer1.localObject(py);
+		Artist a1 = peer1.localObject(a);
 
-        final ObjectContext peer2 = runtime.getContext(context);
-        final Painting py2 = peer2.localObject(py);
-        final Artist a2 = peer2.localObject(a);
+		final ObjectContext peer2 = runtime.getContext(context);
+		final Painting py2 = peer2.localObject(py);
+		final Artist a2 = peer2.localObject(a);
 
-        a1.addToPaintingArray(py1);
-        assertEquals(1, a2.getPaintingArray().size());
-        assertFalse(a2.getPaintingArray().contains(py2));
-        peer1.commitChangesToParent();
-        // pause to let the context events propagate
-        new ThreadedTestHelper() {
+		a1.addToPaintingArray(py1);
+		assertEquals(1, a2.getPaintingArray().size());
+		assertFalse(a2.getPaintingArray().contains(py2));
+		peer1.commitChangesToParent();
+		// pause to let the context events propagate
+		new ParallelTestContainer() {
 
-            @Override
-            protected void assertResult() throws Exception {
-                assertEquals(2, a2.getPaintingArray().size());
-                assertTrue(a2.getPaintingArray().contains(py2));
+			@Override
+			protected void assertResult() throws Exception {
+				assertEquals(2, a2.getPaintingArray().size());
+				assertTrue(a2.getPaintingArray().contains(py2));
 
-                assertFalse(
-                        "Peer data context became dirty on event processing",
-                        peer2.hasChanges());
-            }
-        }.assertWithTimeout(2000);
+				assertFalse(
+						"Peer data context became dirty on event processing",
+						peer2.hasChanges());
+			}
+		}.runTest(2000);
 
-    }
+	}
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContext_DeadlockTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContext_DeadlockTest.java?rev=1385283&r1=1385282&r2=1385283&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContext_DeadlockTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContext_DeadlockTest.java Sun Sep 16 15:16:52 2012
@@ -27,10 +27,10 @@ import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.query.EJBQLQuery;
 import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.test.jdbc.TableHelper;
+import org.apache.cayenne.test.parallel.ParallelTestContainer;
 import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
-import org.apache.cayenne.unit.util.ThreadedTestHelper;
 
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
 public class NestedDataContext_DeadlockTest extends ServerCase {
@@ -80,7 +80,7 @@ public class NestedDataContext_DeadlockT
 			threads[i].start();
 		}
 
-		new ThreadedTestHelper() {
+		new ParallelTestContainer() {
 
 			@Override
 			protected void assertResult() throws Exception {
@@ -91,7 +91,7 @@ public class NestedDataContext_DeadlockT
 					assertTrue("Deadlocked thread", !threads[i].isAlive());
 				}
 			}
-		}.assertWithTimeout(2000);
+		}.runTest(2000);
 
 	}
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreGCTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreGCTest.java?rev=1385283&r1=1385282&r2=1385283&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreGCTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreGCTest.java Sun Sep 16 15:16:52 2012
@@ -23,10 +23,10 @@ import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.test.jdbc.DBHelper;
+import org.apache.cayenne.test.parallel.ParallelTestContainer;
 import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
-import org.apache.cayenne.unit.util.ThreadedTestHelper;
 
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
 public class ObjectStoreGCTest extends ServerCase {
@@ -56,14 +56,14 @@ public class ObjectStoreGCTest extends S
         assertEquals(1, context.getObjectStore().registeredObjectsCount());
 
         // allow for slow GC
-        new ThreadedTestHelper() {
+        new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
                 System.gc();
                 assertEquals(0, context.getObjectStore().registeredObjectsCount());
             }
-        }.assertWithTimeout(2000);
+        }.runTest(2000);
     }
 
     public void testRetainUnreferencedNew() throws Exception {
@@ -74,25 +74,25 @@ public class ObjectStoreGCTest extends S
         assertEquals(1, context.getObjectStore().registeredObjectsCount());
 
         // allow for slow GC
-        new ThreadedTestHelper() {
+        new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
                 System.gc();
                 assertEquals(1, context.getObjectStore().registeredObjectsCount());
             }
-        }.assertWithTimeout(2000);
+        }.runTest(2000);
 
         assertEquals(1, context.getObjectStore().registeredObjectsCount());
         context.commitChanges();
-        new ThreadedTestHelper() {
+        new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
                 System.gc();
                 assertEquals(0, context.getObjectStore().registeredObjectsCount());
             }
-        }.assertWithTimeout(2000);
+        }.runTest(2000);
 
     }
 
@@ -107,24 +107,24 @@ public class ObjectStoreGCTest extends S
         a = null;
         assertEquals(1, context.getObjectStore().registeredObjectsCount());
 
-        new ThreadedTestHelper() {
+        new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
                 System.gc();
                 assertEquals(1, context.getObjectStore().registeredObjectsCount());
             }
-        }.assertWithTimeout(2000);
+        }.runTest(2000);
 
         context.commitChanges();
-        new ThreadedTestHelper() {
+        new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
                 System.gc();
                 assertEquals(0, context.getObjectStore().registeredObjectsCount());
             }
-        }.assertWithTimeout(2000);
+        }.runTest(2000);
 
     }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/SoftDeleteBatchQueryBuilderTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/SoftDeleteBatchQueryBuilderTest.java?rev=1385283&r1=1385282&r2=1385283&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/SoftDeleteBatchQueryBuilderTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/SoftDeleteBatchQueryBuilderTest.java Sun Sep 16 15:16:52 2012
@@ -36,10 +36,10 @@ import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.query.DeleteBatchQuery;
 import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.test.parallel.ParallelTestContainer;
 import org.apache.cayenne.testdo.locking.SoftTest;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
-import org.apache.cayenne.unit.util.ThreadedTestHelper;
 
 @UseServerRuntime(ServerCase.LOCKING_PROJECT)
 public class SoftDeleteBatchQueryBuilderTest extends ServerCase {
@@ -170,7 +170,7 @@ public class SoftDeleteBatchQueryBuilder
 
             final SelectQuery query = new SelectQuery(SoftTest.class);
 
-            new ThreadedTestHelper() {
+            new ParallelTestContainer() {
 
                 @Override
                 protected void assertResult() throws Exception {
@@ -182,13 +182,13 @@ public class SoftDeleteBatchQueryBuilder
                     query.andQualifier(ExpressionFactory.matchDbExp("DELETED", true));
                     assertEquals(0, context.performQuery(query).size());
                 }
-            }.assertWithTimeout(200);
+            }.runTest(200);
 
             context.deleteObjects(test);
             assertEquals(test.getPersistenceState(), PersistenceState.DELETED);
             context.commitChanges();
 
-            new ThreadedTestHelper() {
+            new ParallelTestContainer() {
 
                 @Override
                 protected void assertResult() throws Exception {
@@ -203,7 +203,7 @@ public class SoftDeleteBatchQueryBuilder
                     template.setFetchingDataRows(true);
                     assertEquals(1, context.performQuery(template).size());
                 }
-            }.assertWithTimeout(200);
+            }.runTest(200);
         }
         finally {
             context.performQuery(new SQLTemplate(entity, "DELETE FROM SOFT_TEST"));

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/event/DefaultEventManagerTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/event/DefaultEventManagerTest.java?rev=1385283&r1=1385282&r2=1385283&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/event/DefaultEventManagerTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/event/DefaultEventManagerTest.java Sun Sep 16 15:16:52 2012
@@ -25,7 +25,7 @@ import java.util.EventObject;
 import junit.framework.Assert;
 import junit.framework.TestCase;
 
-import org.apache.cayenne.unit.util.ThreadedTestHelper;
+import org.apache.cayenne.test.parallel.ParallelTestContainer;
 
 public class DefaultEventManagerTest extends TestCase implements EventListener {
 
@@ -397,26 +397,26 @@ public class DefaultEventManagerTest ext
             final int expected,
             final DefaultEventManagerTest listener) throws Exception {
 
-        ThreadedTestHelper helper = new ThreadedTestHelper() {
+        ParallelTestContainer helper = new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
                 assertEquals(expected, listener.numberOfReceivedEvents);
             }
         };
-        helper.assertWithTimeout(5000);
+        helper.runTest(5000);
     }
 
     // allows just enough time for the event threads to run
     private static void assertReceivedEventsForClass(final int expected) throws Exception {
-        ThreadedTestHelper helper = new ThreadedTestHelper() {
+        ParallelTestContainer helper = new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
                 assertEquals(expected, numberOfReceivedEventsForClass);
             }
         };
-        helper.assertWithTimeout(5000);
+        helper.runTest(5000);
     }
 
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/event/EventBridgeTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/event/EventBridgeTest.java?rev=1385283&r1=1385282&r2=1385283&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/event/EventBridgeTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/event/EventBridgeTest.java Sun Sep 16 15:16:52 2012
@@ -24,7 +24,7 @@ import java.util.Collection;
 import junit.framework.TestCase;
 
 import org.apache.cayenne.access.event.SnapshotEvent;
-import org.apache.cayenne.unit.util.ThreadedTestHelper;
+import org.apache.cayenne.test.parallel.ParallelTestContainer;
 
 /**
  */
@@ -104,7 +104,7 @@ public class EventBridgeTest extends Tes
 
         // since bridge is notified asynchronously by default,
         // we must wait till notification is received
-        ThreadedTestHelper helper = new ThreadedTestHelper() {
+        ParallelTestContainer helper = new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
@@ -113,7 +113,7 @@ public class EventBridgeTest extends Tes
             }
         };
 
-        helper.assertWithTimeout(5000);
+        helper.runTest(5000);
 
         final SnapshotEvent eventWithSubject = new SnapshotEvent(
                 this,
@@ -129,7 +129,7 @@ public class EventBridgeTest extends Tes
 
         // since bridge is notified asynchronously by default,
         // we must wait till notification is received
-        ThreadedTestHelper helper1 = new ThreadedTestHelper() {
+        ParallelTestContainer helper1 = new ParallelTestContainer() {
 
             @Override
             protected void assertResult() throws Exception {
@@ -138,7 +138,7 @@ public class EventBridgeTest extends Tes
             }
         };
 
-        helper1.assertWithTimeout(5000);
+        helper1.runTest(5000);
     }
 
     class TestBridge extends EventBridge {



Mime
View raw message