JBoss Cache SVN: r5910 - core/trunk/src/test/java/org/jboss/cache/util/internals.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-05-29 08:20:13 -0400 (Thu, 29 May 2008)
New Revision: 5910
Modified:
core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationListener.java
Log:
1. Genericized
2. Added an additional wait() method to allow for more detailed time units
Modified: core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationListener.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationListener.java 2008-05-29 12:01:48 UTC (rev 5909)
+++ core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationListener.java 2008-05-29 12:20:13 UTC (rev 5910)
@@ -20,8 +20,9 @@
/**
* Utility class that notifies when certain commands were asynchronously replicated on secondary cache.
* Especially useful for avaoiding Thread.sleep() statements.
+ * <p/>
+ * Usage:
* <pre>
- * Usage:
* Cache c1, c2; //these being two async caches
* AsyncReplicationListener listener2 = new AsyncReplicationListener(c2);
* listener2.expect(PutKeyValueCommand.class);
@@ -30,7 +31,7 @@
* </pre>
* Lifecycle - after being used (i.e. waitForReplicationToOccur returns sucessfully) the object returns to the
* non-initialized state and *can* be reused through expect-wait cycle.
- * Note: this class might be used aswell for sync caches, though it does not really make sence using it in these scenarios
+ * Note: this class might be used aswell for sync caches, though it does not really make sence using it in these scenarios
*
* @author Mircea.Markus(a)jboss.com
* @since 2.2
@@ -38,7 +39,7 @@
public class ReplicationListener
{
private CountDownLatch latch = new CountDownLatch(1);
- private Set expectedCommands;
+ private Set<Class<? extends ReplicableCommand>> expectedCommands;
/**
* Builds a listener that will observe the given cache for recieving replication commands.
@@ -74,10 +75,10 @@
if (result instanceof ReplicateCommand && expectedCommands != null)
{
ReplicateCommand replicateCommand = (ReplicateCommand) result;
- Iterator it = expectedCommands.iterator();
+ Iterator<Class<? extends ReplicableCommand>> it = expectedCommands.iterator();
while (it.hasNext())
{
- Class<? extends ReplicableCommand> replicableCommandClass = (Class<? extends ReplicableCommand>) it.next();
+ Class<? extends ReplicableCommand> replicableCommandClass = it.next();
if (replicateCommand.containsCommandType(replicableCommandClass))
{
it.remove();
@@ -103,20 +104,35 @@
/**
* Blocks for the elements specified through {@link #expect(Class[])} invocations to be replicated in this cache.
* if replication does not occur in the give timeout then an exception is being thrown.
+ *
+ * @param timeoutMillis timeout in milliseconds
*/
public void waitForReplicationToOccur(long timeoutMillis)
{
+ waitForReplicationToOccur(timeoutMillis, TimeUnit.MILLISECONDS);
+ }
+
+ /**
+ * Similar to {@link #waitForReplicationToOccur(long)} except that this method provides more flexibility in time units.
+ *
+ * @param timeout the maximum time to wait
+ * @param timeUnit the time unit of the <tt>timeout</tt> argument.
+ */
+ public void waitForReplicationToOccur(long timeout, TimeUnit timeUnit)
+ {
assert expectedCommands != null : "there are no replication expectations; please use AsyncReplicationListener.expect(...) before calling this method";
try
{
- if (!latch.await(timeoutMillis, TimeUnit.MILLISECONDS))
+ if (!latch.await(timeout, timeUnit))
{
- assert false : "waiting for more than " + timeoutMillis + " millis and following commands did not replicate: " + expectedCommands;
+ assert false : "waiting for more than " + timeout + " " + timeUnit + " and following commands did not replicate: " + expectedCommands;
}
- } catch (InterruptedException e)
+ }
+ catch (InterruptedException e)
{
throw new IllegalStateException("unexpected", e);
- } finally
+ }
+ finally
{
expectedCommands = null;
latch = new CountDownLatch(1);
@@ -131,7 +147,7 @@
{
if (this.expectedCommands == null)
{
- this.expectedCommands = new HashSet();
+ this.expectedCommands = new HashSet<Class<? extends ReplicableCommand>>();
}
this.expectedCommands.addAll(Arrays.asList(expectedCommands));
}
16 years, 7 months
JBoss Cache SVN: r5909 - core/trunk/src/main/java/org/jboss/cache/notifications/annotation.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-05-29 08:01:48 -0400 (Thu, 29 May 2008)
New Revision: 5909
Modified:
core/trunk/src/main/java/org/jboss/cache/notifications/annotation/CacheListener.java
Log:
Updated javadocs
Modified: core/trunk/src/main/java/org/jboss/cache/notifications/annotation/CacheListener.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/notifications/annotation/CacheListener.java 2008-05-29 07:42:12 UTC (rev 5908)
+++ core/trunk/src/main/java/org/jboss/cache/notifications/annotation/CacheListener.java 2008-05-29 12:01:48 UTC (rev 5909)
@@ -147,6 +147,11 @@
* <td valign=@"top">{@link org.jboss.cache.notifications.event.TransactionCompletedEvent}</td>
* <td valign="top">The cache has completed it's participation in a transaction</td>
* </tr>
+ * <tr>
+ * <td valign="top">{@link BuddyGroupChanged}</td>
+ * <td valign=@"top">{@link org.jboss.cache.notifications.event.BuddyGroupChangedEvent}</td>
+ * <td valign="top">Buddy replication is enabled and one of the buddy groups that the instance is a member of has changed it's membership.</td>
+ * </tr>
* <p/>
* </table>
* <p/>
@@ -277,6 +282,7 @@
* @see CacheUnblocked
* @see TransactionCompleted
* @see TransactionRegistered
+ * @see BuddyGroupChanged
* @see org.jboss.cache.Cache#addCacheListener(Object)
* @see org.jboss.cache.Cache#addCacheListener(org.jboss.cache.Fqn,Object)
* @see org.jboss.cache.Cache#removeCacheListener(Object)
16 years, 7 months
JBoss Cache SVN: r5908 - core/trunk/src/test/java/org/jboss/cache/replicated.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-05-29 03:42:12 -0400 (Thu, 29 May 2008)
New Revision: 5908
Modified:
core/trunk/src/test/java/org/jboss/cache/replicated/AsyncReplTest.java
Log:
JBCACHE-1338 - migrated to the new notification mechanism
Modified: core/trunk/src/test/java/org/jboss/cache/replicated/AsyncReplTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/replicated/AsyncReplTest.java 2008-05-29 07:32:14 UTC (rev 5907)
+++ core/trunk/src/test/java/org/jboss/cache/replicated/AsyncReplTest.java 2008-05-29 07:42:12 UTC (rev 5908)
@@ -13,6 +13,7 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.util.TestingUtil;
+import org.jboss.cache.util.internals.ReplicationListener;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import static org.testng.AssertJUnit.*;
@@ -32,15 +33,18 @@
public class AsyncReplTest
{
private CacheSPI<Object, Object> cache1, cache2;
+ private ReplicationListener replListener1, replListener2;
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception
{
log("creating cache1");
cache1 = createCache("CacheGroup");
+ replListener1 = new ReplicationListener(cache1);
log("creating cache2");
cache2 = createCache("CacheGroup");
+ replListener2 = new ReplicationListener(cache2);
}
@@ -96,22 +100,24 @@
Fqn fqn = Fqn.fromString("/a");
String key = "key";
+ replListener2.expectAny();
cache1.put(fqn, key, "value1");
// allow for replication
- TestingUtil.sleepThread((long) 500);
+ replListener2.waitForReplicationToOccur(500);
assertEquals("value1", cache1.get(fqn, key));
assertEquals("value1", cache2.get(fqn, key));
TransactionManager mgr = cache1.getTransactionManager();
mgr.begin();
+ replListener2.expectAny();
cache1.put(fqn, key, "value2");
assertEquals("value2", cache1.get(fqn, key));
assertEquals("value1", cache2.get(fqn, key));
mgr.commit();
- TestingUtil.sleepThread((long) 500);
+ replListener2.waitForReplicationToOccur(500);
assertEquals("value2", cache1.get(fqn, key));
assertEquals("value2", cache2.get(fqn, key));
@@ -123,8 +129,6 @@
mgr.rollback();
- TestingUtil.sleepThread((long) 500);
-
assertEquals("value2", cache1.get(fqn, key));
assertEquals("value2", cache2.get(fqn, key));
}
@@ -136,10 +140,11 @@
{
cache3 = createCache("DifferentGroup");
cache4 = createCache("DifferentGroup");
+ replListener2.expectAny();
cache1.put("/a/b/c", "age", 38);
// because we use async repl, modfication may not yet have been propagated to cache2, so
// we have to wait a little
- TestingUtil.sleepThread((long) 1000);
+ replListener2.waitForReplicationToOccur(500);
assertNull("Should not have replicated", cache3.get("/a/b/c", "age"));
}
catch (Exception e)
16 years, 7 months
JBoss Cache SVN: r5907 - in core/trunk/src/test/java/org/jboss/cache: optimistic and 3 other directories.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-05-29 03:32:14 -0400 (Thu, 29 May 2008)
New Revision: 5907
Modified:
core/trunk/src/test/java/org/jboss/cache/lock/PessimisticLockTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/AsyncFullStackInterceptorTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/FullStackInterceptorTest.java
core/trunk/src/test/java/org/jboss/cache/options/ForceWriteLockTest.java
core/trunk/src/test/java/org/jboss/cache/transaction/TransactionTest.java
core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationListener.java
Log:
JBCACHE-1338 - added an ReplicationListener for being notified on asyn replication events
Modified: core/trunk/src/test/java/org/jboss/cache/lock/PessimisticLockTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/lock/PessimisticLockTest.java 2008-05-29 07:24:18 UTC (rev 5906)
+++ core/trunk/src/test/java/org/jboss/cache/lock/PessimisticLockTest.java 2008-05-29 07:32:14 UTC (rev 5907)
@@ -7,7 +7,7 @@
import org.jboss.cache.NodeSPI;
import static org.jboss.cache.lock.LockType.READ;
import static org.jboss.cache.lock.LockType.WRITE;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.transaction.DummyTransactionManagerLookup;
import static org.testng.AssertJUnit.assertFalse;
import static org.testng.AssertJUnit.assertTrue;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/AsyncFullStackInterceptorTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/AsyncFullStackInterceptorTest.java 2008-05-29 07:24:18 UTC (rev 5906)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/AsyncFullStackInterceptorTest.java 2008-05-29 07:32:14 UTC (rev 5907)
@@ -5,7 +5,7 @@
import org.jboss.cache.config.Configuration;
import org.jboss.cache.loader.SamplePojo;
import org.jboss.cache.lock.LockManager;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
import org.jboss.cache.transaction.TransactionTable;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/FullStackInterceptorTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/FullStackInterceptorTest.java 2008-05-29 07:24:18 UTC (rev 5906)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/FullStackInterceptorTest.java 2008-05-29 07:32:14 UTC (rev 5907)
@@ -7,7 +7,7 @@
import org.jboss.cache.config.Configuration;
import org.jboss.cache.loader.SamplePojo;
import org.jboss.cache.lock.LockManager;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
import org.jboss.cache.transaction.TransactionTable;
Modified: core/trunk/src/test/java/org/jboss/cache/options/ForceWriteLockTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/options/ForceWriteLockTest.java 2008-05-29 07:24:18 UTC (rev 5906)
+++ core/trunk/src/test/java/org/jboss/cache/options/ForceWriteLockTest.java 2008-05-29 07:32:14 UTC (rev 5907)
@@ -8,7 +8,7 @@
import org.jboss.cache.config.Configuration;
import org.jboss.cache.lock.LockManager;
import org.jboss.cache.lock.LockType;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.assertTrue;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/transaction/TransactionTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/transaction/TransactionTest.java 2008-05-29 07:24:18 UTC (rev 5906)
+++ core/trunk/src/test/java/org/jboss/cache/transaction/TransactionTest.java 2008-05-29 07:32:14 UTC (rev 5907)
@@ -19,7 +19,7 @@
import org.jboss.cache.lock.LockManager;
import static org.jboss.cache.lock.LockType.READ;
import static org.jboss.cache.lock.LockType.WRITE;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.util.CachePrinter;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationListener.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationListener.java 2008-05-29 07:24:18 UTC (rev 5906)
+++ core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationListener.java 2008-05-29 07:32:14 UTC (rev 5907)
@@ -28,6 +28,8 @@
* c1.put(fqn, key, value);
* listener2.waitForReplicationToOccur(1000); // -this will block here untill c2 recieves the PutKeyValueCommand command
* </pre>
+ * Lifecycle - after being used (i.e. waitForReplicationToOccur returns sucessfully) the object returns to the
+ * non-initialized state and *can* be reused through expect-wait cycle.
* Note: this class might be used aswell for sync caches, though it does not really make sence using it in these scenarios
*
* @author Mircea.Markus(a)jboss.com
16 years, 7 months
JBoss Cache SVN: r5906 - in core/trunk/src: main/java/org/jboss/cache/commands/remote and 32 other directories.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-05-29 03:24:18 -0400 (Thu, 29 May 2008)
New Revision: 5906
Added:
core/trunk/src/test/java/org/jboss/cache/util/TestingUtil.java
core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationListener.java
core/trunk/src/test/java/org/jboss/cache/util/internals/ViewChangeListener.java
Removed:
core/trunk/src/test/java/org/jboss/cache/misc/
Modified:
core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java
core/trunk/src/main/java/org/jboss/cache/commands/remote/ReplicateCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/tx/PrepareCommand.java
core/trunk/src/main/java/org/jboss/cache/interceptors/ReplicationInterceptor.java
core/trunk/src/main/java/org/jboss/cache/marshall/AbstractMarshaller.java
core/trunk/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java
core/trunk/src/main/java/org/jboss/cache/marshall/InactiveRegionAwareRpcDispatcher.java
core/trunk/src/main/java/org/jboss/cache/marshall/Marshaller.java
core/trunk/src/main/java/org/jboss/cache/marshall/RegionalizedMethodCall.java
core/trunk/src/main/java/org/jboss/cache/marshall/VersionAwareMarshaller.java
core/trunk/src/test/java/org/jboss/cache/CacheFactoryTest.java
core/trunk/src/test/java/org/jboss/cache/api/CacheSPITest.java
core/trunk/src/test/java/org/jboss/cache/api/DeletedChildResurrectionTest.java
core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java
core/trunk/src/test/java/org/jboss/cache/api/ResidentNodesTest.java
core/trunk/src/test/java/org/jboss/cache/api/SyncReplTest.java
core/trunk/src/test/java/org/jboss/cache/api/SyncReplTxTest.java
core/trunk/src/test/java/org/jboss/cache/api/nodevalidity/LocalPessNodeValidityTest.java
core/trunk/src/test/java/org/jboss/cache/api/nodevalidity/NodeValidityTestBase.java
core/trunk/src/test/java/org/jboss/cache/api/pfer/PutForExternalReadTestBase.java
core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyAssignmentStateTransferTest.java
core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyBackupActivationInactivationTest.java
core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyGroupAssignmentTest.java
core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyPoolBroadcastTest.java
core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationContentTest.java
core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationFailoverTest.java
core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationRejoinTest.java
core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationTestsBase.java
core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithCacheLoaderTest.java
core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithTransactionsTest.java
core/trunk/src/test/java/org/jboss/cache/buddyreplication/DisabledStateTransferTest.java
core/trunk/src/test/java/org/jboss/cache/buddyreplication/EvictionOfBuddyBackupsTest.java
core/trunk/src/test/java/org/jboss/cache/buddyreplication/GravitationCleanupTest.java
core/trunk/src/test/java/org/jboss/cache/cluster/ReplicationQueueTest.java
core/trunk/src/test/java/org/jboss/cache/cluster/ReplicationQueueTxTest.java
core/trunk/src/test/java/org/jboss/cache/config/ChannelInjectionTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/ConcurrentEvictionTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/ExpirationPolicyTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/FIFOPolicyTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/LFUPolicyTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/LRUAlgorithmTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/LRUPolicyTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/MRUPolicyTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/NullEvictionPolicyTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/OptimisticEvictionTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/ProgrammaticLRUPolicyTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/ReplicatedLRUPolicyTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/minttl/FIFOMinTTLTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/minttl/MRUMinTTLTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/minttl/MinTTLTestBase.java
core/trunk/src/test/java/org/jboss/cache/factories/InterceptorChainFactoryTest.java
core/trunk/src/test/java/org/jboss/cache/factories/LateConfigurationTest.java
core/trunk/src/test/java/org/jboss/cache/factories/LifeCycleTest.java
core/trunk/src/test/java/org/jboss/cache/interceptors/EvictionInterceptorTest.java
core/trunk/src/test/java/org/jboss/cache/interceptors/LegacyInterceptorTest.java
core/trunk/src/test/java/org/jboss/cache/interceptors/MarshalledValueInterceptorTest.java
core/trunk/src/test/java/org/jboss/cache/invalidation/InvalidationInterceptorTest.java
core/trunk/src/test/java/org/jboss/cache/invalidation/TombstoneEvictionTest.java
core/trunk/src/test/java/org/jboss/cache/invalidation/VersionInconsistencyTest.java
core/trunk/src/test/java/org/jboss/cache/jmx/CacheJmxWrapperTest.java
core/trunk/src/test/java/org/jboss/cache/loader/AdjListJDBCCacheLoaderCompatibilityTest.java
core/trunk/src/test/java/org/jboss/cache/loader/BdbjeCacheLoaderTest.java
core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderMethodCallCounterTest.java
core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderWithReplicationTest.java
core/trunk/src/test/java/org/jboss/cache/loader/ChainingCacheLoaderBasicTest.java
core/trunk/src/test/java/org/jboss/cache/loader/ClusteredCacheLoaderTest.java
core/trunk/src/test/java/org/jboss/cache/loader/FileCacheLoaderTest.java
core/trunk/src/test/java/org/jboss/cache/loader/JdbmCacheLoaderTest.java
core/trunk/src/test/java/org/jboss/cache/loader/SingletonStoreCacheLoaderTest.java
core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheLoaderTest.java
core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheServerTest.java
core/trunk/src/test/java/org/jboss/cache/loader/TxCacheLoaderTest.java
core/trunk/src/test/java/org/jboss/cache/lock/AcquireAllTest.java
core/trunk/src/test/java/org/jboss/cache/lock/BreakDeadMemberLocksTest.java
core/trunk/src/test/java/org/jboss/cache/lock/IdentityLockTest.java
core/trunk/src/test/java/org/jboss/cache/lock/LockTest.java
core/trunk/src/test/java/org/jboss/cache/lock/NonBlockingWriterLockTest.java
core/trunk/src/test/java/org/jboss/cache/lock/ReadWriteLockWithUpgradeTest.java
core/trunk/src/test/java/org/jboss/cache/lock/ReentrantWriterPreferenceReadWriteLockTest.java
core/trunk/src/test/java/org/jboss/cache/lock/pessimistic/ConcurrentPutRemoveTest.java
core/trunk/src/test/java/org/jboss/cache/marshall/ActiveInactiveTest.java
core/trunk/src/test/java/org/jboss/cache/marshall/AsyncReplTest.java
core/trunk/src/test/java/org/jboss/cache/marshall/CacheLoaderMarshallingJDBCTest.java
core/trunk/src/test/java/org/jboss/cache/marshall/CacheLoaderMarshallingTest.java
core/trunk/src/test/java/org/jboss/cache/marshall/InvalidRegionForStateTransferTest.java
core/trunk/src/test/java/org/jboss/cache/marshall/MarshalledValueTest.java
core/trunk/src/test/java/org/jboss/cache/marshall/RegionManagerTest.java
core/trunk/src/test/java/org/jboss/cache/marshall/ReplicateToInactiveRegionTest.java
core/trunk/src/test/java/org/jboss/cache/marshall/ReturnValueMarshallingTest.java
core/trunk/src/test/java/org/jboss/cache/marshall/SyncReplTest.java
core/trunk/src/test/java/org/jboss/cache/mgmt/CacheLoaderTest.java
core/trunk/src/test/java/org/jboss/cache/mgmt/InvalidationTest.java
core/trunk/src/test/java/org/jboss/cache/mgmt/PassivationTest.java
core/trunk/src/test/java/org/jboss/cache/notifications/BuddyGroupChangeNotificationTest.java
core/trunk/src/test/java/org/jboss/cache/notifications/NotificationThreadTest.java
core/trunk/src/test/java/org/jboss/cache/notifications/RemoteCacheListenerTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/AbstractOptimisticTestCase.java
core/trunk/src/test/java/org/jboss/cache/optimistic/AsyncCacheTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/CacheTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/ConcurrentTransactionTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/DataVersionTransferTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorGetChildrenNamesTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorGetKeyValTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorGetKeysTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorKeyValTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorPutEraseTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorPutMapTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorRemoveDataTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorRemoveKeyValTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorTransactionTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/OptimisticCreateIfNotExistsInterceptorTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/OptimisticLockInterceptorTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/OptimisticReplicationInterceptorTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/RemoveBeforeCreateTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/ThreadedOptimisticCreateIfNotExistsInterceptorTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/TxInterceptorTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/ValidatorInterceptorTest.java
core/trunk/src/test/java/org/jboss/cache/options/CacheModeLocalSimpleTest.java
core/trunk/src/test/java/org/jboss/cache/options/ExplicitVersionsReplTest.java
core/trunk/src/test/java/org/jboss/cache/options/ForceCacheModeTest.java
core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/AsyncInvalidationOptLocksTest.java
core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/AsyncInvalidationPessLocksTest.java
core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/AsyncReplOptLocksTest.java
core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/AsyncReplPessLocksTest.java
core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/SyncReplOptLocksTest.java
core/trunk/src/test/java/org/jboss/cache/passivation/BasicPassivationTest.java
core/trunk/src/test/java/org/jboss/cache/passivation/LocalPassivationIntegrationTest.java
core/trunk/src/test/java/org/jboss/cache/passivation/PassivationTestsBase.java
core/trunk/src/test/java/org/jboss/cache/passivation/ReplicatedPassivationIntegrationTest.java
core/trunk/src/test/java/org/jboss/cache/profiling/ProfileTest.java
core/trunk/src/test/java/org/jboss/cache/replicated/AsyncReplTest.java
core/trunk/src/test/java/org/jboss/cache/replicated/ExceptionTest.java
core/trunk/src/test/java/org/jboss/cache/replicated/SyncReplTest.java
core/trunk/src/test/java/org/jboss/cache/replicated/SyncReplTxTest.java
core/trunk/src/test/java/org/jboss/cache/statetransfer/FailedStateTransferTest.java
core/trunk/src/test/java/org/jboss/cache/statetransfer/ForcedStateTransferTest.java
core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransfer200Test.java
core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferConcurrencyTest.java
core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferTestBase.java
core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferUnderLoadTest.java
core/trunk/src/test/java/org/jboss/cache/transaction/AbortionTest.java
core/trunk/src/test/java/org/jboss/cache/transaction/ConcurrentBankTest.java
core/trunk/src/test/java/org/jboss/cache/transaction/DeadlockTest.java
core/trunk/src/test/java/org/jboss/cache/transaction/InvocationContextCleanupTest.java
core/trunk/src/test/java/org/jboss/cache/transaction/PrepareCommitContentionTest.java
core/trunk/src/test/java/org/jboss/cache/transaction/SimultaneousRollbackAndPutTest.java
core/trunk/src/test/java/org/jboss/cache/util/internals/EvictionController.java
core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationQueueNotifier.java
Log:
JBCACHE-1338 - added an ReplicationListener for being notified on asyn replication events
Modified: core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -75,7 +75,7 @@
/**
* JGroups RpcDispatcher in use.
*/
- private CommandAwareRpcDispatcher disp = null;
+ private CommandAwareRpcDispatcher rpcDispatcher = null;
/**
* JGroups message listener.
@@ -207,17 +207,17 @@
channel = null;
configuration.getRuntimeConfig().setChannel(null);
- if (disp != null)
+ if (rpcDispatcher != null)
{
log.info("Stopping the RpcDispatcher");
- disp.stop();
+ rpcDispatcher.stop();
}
if (members != null) members = null;
coordinator = false;
- disp = null;
+ rpcDispatcher = null;
}
/**
@@ -284,17 +284,17 @@
// but only if we are using region based marshalling?!??
if (configuration.isUseRegionBasedMarshalling())
{
- disp = new InactiveRegionAwareRpcDispatcher(channel, messageListener, new MembershipListenerAdaptor(),
+ rpcDispatcher = new InactiveRegionAwareRpcDispatcher(channel, messageListener, new MembershipListenerAdaptor(),
spi, invocationContextContainer, interceptorChain, componentRegistry);
}
else
{
- disp = new CommandAwareRpcDispatcher(channel, messageListener, new MembershipListenerAdaptor(),
+ rpcDispatcher = new CommandAwareRpcDispatcher(channel, messageListener, new MembershipListenerAdaptor(),
invocationContextContainer, invocationContextContainer, interceptorChain, componentRegistry);
}
- disp.setRequestMarshaller(marshaller);
- disp.setResponseMarshaller(marshaller);
+ rpcDispatcher.setRequestMarshaller(marshaller);
+ rpcDispatcher.setResponseMarshaller(marshaller);
}
public Channel getChannel()
@@ -383,7 +383,7 @@
public List<Object> callRemoteMethods(Vector<Address> recipients, ReplicableCommand command, int mode, long timeout, RspFilter responseFilter, boolean useOutOfBandMessage) throws Exception
{
// short circuit if we don't have an RpcDispatcher!
- if (disp == null) return null;
+ if (rpcDispatcher == null) return null;
int modeToUse = mode;
int preferredMode;
@@ -401,7 +401,7 @@
useOutOfBandMessage = false;
- RspList rsps = disp.invokeRemoteCommands(recipients, command, modeToUse, timeout, isUsingBuddyReplication, useOutOfBandMessage, responseFilter);
+ RspList rsps = rpcDispatcher.invokeRemoteCommands(recipients, command, modeToUse, timeout, isUsingBuddyReplication, useOutOfBandMessage, responseFilter);
if (mode == GroupRequest.GET_NONE) return Collections.emptyList();// async case
Modified: core/trunk/src/main/java/org/jboss/cache/commands/remote/ReplicateCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/remote/ReplicateCommand.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/ReplicateCommand.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -244,4 +244,20 @@
return clone;
}
+
+ public boolean containsCommandType(Class<? extends ReplicableCommand> aClass)
+ {
+ if (isSingleCommand())
+ {
+ return getSingleModification().getClass().equals(aClass);
+ }
+ else
+ {
+ for (ReplicableCommand command : getModifications())
+ {
+ if (command.getClass().equals(aClass)) return true;
+ }
+ }
+ return false;
+ }
}
\ No newline at end of file
Modified: core/trunk/src/main/java/org/jboss/cache/commands/tx/PrepareCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/tx/PrepareCommand.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/main/java/org/jboss/cache/commands/tx/PrepareCommand.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -3,6 +3,7 @@
import org.jboss.cache.InvocationContext;
import org.jboss.cache.commands.ReversibleCommand;
import org.jboss.cache.commands.Visitor;
+import org.jboss.cache.commands.ReplicableCommand;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jgroups.Address;
@@ -133,4 +134,16 @@
", onePhaseCommit=" + onePhaseCommit +
'}';
}
+
+ public boolean containsModificationType(Class<? extends ReplicableCommand> replicableCommandClass)
+ {
+ for (ReplicableCommand mod : getModifications())
+ {
+ if (mod.getClass().equals(replicableCommandClass))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
}
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/ReplicationInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/ReplicationInterceptor.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/ReplicationInterceptor.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -71,9 +71,7 @@
{
Object returnValue = invokeNextInterceptor(ctx, command);
ctx.getTransactionEntry().setForceAsyncReplication(true);
-
if (local) ctx.getTransactionEntry().addLocalModification(command);
-
return returnValue;
}
else
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/AbstractMarshaller.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/AbstractMarshaller.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/AbstractMarshaller.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -104,7 +104,7 @@
throw new RuntimeException("Needs to be overridden!");
}
- public RegionalizedMethodCall regionalizedMethodCallFromByteBuffer(byte[] buffer) throws Exception
+ public RegionalizedMethodCall regionalizedCommandFromByteBuffer(byte[] buffer) throws Exception
{
throw new RuntimeException("Needs to be overridden!");
}
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -179,4 +179,19 @@
{
return getClass().getSimpleName() + "[Outgoing marshaller: " + req_marshaller + "; incoming marshaller: " + rsp_marshaller + "]";
}
+
+ public InvocationContextContainer getInvocationContextContainer()
+ {
+ return invocationContextContainer;
+ }
+
+ public InterceptorChain getInterceptorChain()
+ {
+ return interceptorChain;
+ }
+
+ public ComponentRegistry getComponentRegistry()
+ {
+ return componentRegistry;
+ }
}
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/InactiveRegionAwareRpcDispatcher.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/InactiveRegionAwareRpcDispatcher.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/InactiveRegionAwareRpcDispatcher.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -53,7 +53,7 @@
try
{
// we will ALWAYS be using the marshaller to unmarshall requests.
- rmc = requestMarshaller.regionalizedMethodCallFromByteBuffer(req.getBuffer());
+ rmc = requestMarshaller.regionalizedCommandFromByteBuffer(req.getBuffer());
command = rmc.command;
}
catch (Throwable e)
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/Marshaller.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/Marshaller.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/Marshaller.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -78,7 +78,7 @@
* @throws Exception if there are issues
* @since 2.1.1
*/
- RegionalizedMethodCall regionalizedMethodCallFromByteBuffer(byte[] buffer) throws Exception;
+ RegionalizedMethodCall regionalizedCommandFromByteBuffer(byte[] buffer) throws Exception;
/**
* Returns a RegionalizedMethodCall from an object input stream. Only use if you <i>know</i> that the byte buffer contains a
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/RegionalizedMethodCall.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/RegionalizedMethodCall.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/RegionalizedMethodCall.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -4,7 +4,7 @@
import org.jboss.cache.commands.ReplicableCommand;
/**
- * A regionalized MethodCall object, created when {@link Marshaller#regionalizedMethodCallFromByteBuffer(byte[])} or
+ * A regionalized MethodCall object, created when {@link Marshaller#regionalizedCommandFromByteBuffer(byte[])} or
* {@link org.jboss.cache.marshall.Marshaller#regionalizedMethodCallFromObjectStream(java.io.ObjectInputStream)} is called.
* <p/>
* Specifically used by the {@link org.jboss.cache.marshall.InactiveRegionAwareRpcDispatcher} so that the region used to unmarshall
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/VersionAwareMarshaller.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/VersionAwareMarshaller.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/VersionAwareMarshaller.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -190,7 +190,7 @@
}
@Override
- public RegionalizedMethodCall regionalizedMethodCallFromByteBuffer(byte[] buf) throws Exception
+ public RegionalizedMethodCall regionalizedCommandFromByteBuffer(byte[] buf) throws Exception
{
Marshaller marshaller;
int versionId;
Modified: core/trunk/src/test/java/org/jboss/cache/CacheFactoryTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/CacheFactoryTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/CacheFactoryTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -9,7 +9,7 @@
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.transaction.DummyTransactionManagerLookup;
import static org.testng.AssertJUnit.assertEquals;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/api/CacheSPITest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/CacheSPITest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/api/CacheSPITest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -2,11 +2,11 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.misc.TestingUtil;
-import org.jboss.cache.misc.ViewChangeListener;
+import org.jboss.cache.util.internals.ViewChangeListener;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/api/DeletedChildResurrectionTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/DeletedChildResurrectionTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/api/DeletedChildResurrectionTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -7,7 +7,7 @@
import org.jboss.cache.Node;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -11,7 +11,7 @@
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.loader.DummyInMemoryCacheLoader;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.xml.XmlHelper;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/api/ResidentNodesTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/ResidentNodesTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/api/ResidentNodesTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -4,12 +4,12 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.internals.EvictionController;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.eviction.LRUConfiguration;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.util.internals.EvictionController;
import static org.testng.Assert.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/api/SyncReplTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/SyncReplTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/api/SyncReplTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -16,7 +16,7 @@
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.config.Option;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/api/SyncReplTxTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/SyncReplTxTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/api/SyncReplTxTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -16,7 +16,7 @@
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.config.Option;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/api/nodevalidity/LocalPessNodeValidityTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/nodevalidity/LocalPessNodeValidityTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/api/nodevalidity/LocalPessNodeValidityTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -3,7 +3,7 @@
import org.jboss.cache.Cache;
import org.jboss.cache.CacheFactory;
import org.jboss.cache.DefaultCacheFactory;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/api/nodevalidity/NodeValidityTestBase.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/nodevalidity/NodeValidityTestBase.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/api/nodevalidity/NodeValidityTestBase.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -7,7 +7,7 @@
import org.jboss.cache.NodeNotValidException;
import org.jboss.cache.NodeSPI;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.optimistic.DefaultDataVersion;
import org.jboss.cache.transaction.DummyTransactionManagerLookup;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/api/pfer/PutForExternalReadTestBase.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/pfer/PutForExternalReadTestBase.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/api/pfer/PutForExternalReadTestBase.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -9,13 +9,15 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.NodeSPI;
import org.jboss.cache.RPCManager;
+import org.jboss.cache.util.TestingUtil;
+import org.jboss.cache.util.internals.ReplicationListener;
import org.jboss.cache.commands.ReplicableCommand;
+import org.jboss.cache.commands.write.*;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.ComponentRegistry;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.lock.NodeLock;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.optimistic.TransactionWorkspace;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
@@ -36,6 +38,10 @@
{
protected CacheSPI<String, String> cache1, cache2;
+ ReplicationListener replListener1;
+ ReplicationListener replListener2;
+
+
protected TransactionManager tm1, tm2;
protected Fqn<String> fqn = Fqn.fromString("/one/two");
@@ -332,8 +338,6 @@
/**
* Tests that suspended transactions do not leak. See JBCACHE-1246.
- *
- * @throws Exception
*/
public void testMemLeakOnSuspendedTransactions() throws Exception
{
Modified: core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyAssignmentStateTransferTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyAssignmentStateTransferTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyAssignmentStateTransferTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -8,7 +8,7 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyBackupActivationInactivationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyBackupActivationInactivationTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyBackupActivationInactivationTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -15,7 +15,7 @@
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.util.CachePrinter;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyGroupAssignmentTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyGroupAssignmentTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyGroupAssignmentTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -10,7 +10,7 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.Cache;
import org.jboss.cache.Fqn;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.util.CachePrinter;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyPoolBroadcastTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyPoolBroadcastTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyPoolBroadcastTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -9,7 +9,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.CacheSPI;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.assertEquals;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationContentTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationContentTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationContentTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -10,7 +10,7 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.notifications.annotation.CacheBlocked;
import org.jboss.cache.notifications.annotation.CacheListener;
import org.jboss.cache.notifications.annotation.CacheUnblocked;
Modified: core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationFailoverTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationFailoverTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationFailoverTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -8,7 +8,7 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jgroups.JChannel;
import org.jgroups.protocols.DISCARD;
import static org.testng.AssertJUnit.*;
Modified: core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationRejoinTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationRejoinTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationRejoinTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -8,7 +8,7 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.config.BuddyReplicationConfig;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.util.CachePrinter;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
Modified: core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationTestsBase.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationTestsBase.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationTestsBase.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -19,8 +19,7 @@
import org.jboss.cache.loader.CacheLoader;
import org.jboss.cache.loader.CacheLoaderManager;
import org.jboss.cache.loader.DummyInMemoryCacheLoader;
-import org.jboss.cache.misc.TestingUtil;
-import org.jboss.cache.util.CachePrinter;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.xml.XmlHelper;
import org.jgroups.Address;
import static org.testng.AssertJUnit.*;
Modified: core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithCacheLoaderTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithCacheLoaderTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithCacheLoaderTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -10,13 +10,13 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.eviction.LRUConfiguration;
import org.jboss.cache.loader.CacheLoader;
-import org.jboss.cache.misc.TestingUtil;
-import static org.jboss.cache.misc.TestingUtil.dumpCacheContents;
+import static org.jboss.cache.util.TestingUtil.dumpCacheContents;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertTrue;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithTransactionsTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithTransactionsTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithTransactionsTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -7,8 +7,8 @@
package org.jboss.cache.buddyreplication;
import org.jboss.cache.Fqn;
-import org.jboss.cache.misc.TestingUtil;
-import static org.jboss.cache.misc.TestingUtil.dumpCacheContents;
+import org.jboss.cache.util.TestingUtil;
+import static org.jboss.cache.util.TestingUtil.dumpCacheContents;
import static org.testng.AssertJUnit.assertTrue;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/buddyreplication/DisabledStateTransferTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/buddyreplication/DisabledStateTransferTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/buddyreplication/DisabledStateTransferTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -2,7 +2,7 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.util.CachePrinter;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/buddyreplication/EvictionOfBuddyBackupsTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/buddyreplication/EvictionOfBuddyBackupsTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/buddyreplication/EvictionOfBuddyBackupsTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -3,11 +3,11 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.eviction.LRUConfiguration;
import org.jboss.cache.eviction.NullEvictionPolicy;
-import org.jboss.cache.misc.TestingUtil;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/buddyreplication/GravitationCleanupTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/buddyreplication/GravitationCleanupTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/buddyreplication/GravitationCleanupTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -2,7 +2,7 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.util.CachePrinter;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/cluster/ReplicationQueueTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/cluster/ReplicationQueueTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/cluster/ReplicationQueueTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -5,10 +5,10 @@
import org.jboss.cache.Cache;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.RPCManager;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.commands.ReplicableCommand;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.ComponentRegistry;
-import org.jboss.cache.misc.TestingUtil;
import org.jgroups.Address;
import static org.testng.AssertJUnit.assertNotNull;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/cluster/ReplicationQueueTxTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/cluster/ReplicationQueueTxTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/cluster/ReplicationQueueTxTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -2,9 +2,9 @@
import org.jboss.cache.Cache;
import org.jboss.cache.DefaultCacheFactory;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.misc.TestingUtil;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/config/ChannelInjectionTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/config/ChannelInjectionTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/config/ChannelInjectionTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -4,7 +4,7 @@
import org.jboss.cache.CacheFactory;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jgroups.JChannel;
import static org.testng.AssertJUnit.assertEquals;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/ConcurrentEvictionTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/ConcurrentEvictionTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/ConcurrentEvictionTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -16,7 +16,7 @@
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.assertNotNull;
import static org.testng.AssertJUnit.fail;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/ExpirationPolicyTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/ExpirationPolicyTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/ExpirationPolicyTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -12,10 +12,10 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.Region;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionPolicyConfig;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/FIFOPolicyTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/FIFOPolicyTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/FIFOPolicyTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -9,18 +9,16 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import java.util.List;
import java.util.ArrayList;
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/LFUPolicyTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/LFUPolicyTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/LFUPolicyTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -9,12 +9,12 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/LRUAlgorithmTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/LRUAlgorithmTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/LRUAlgorithmTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -5,7 +5,7 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.Region;
import org.jboss.cache.RegionManager;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertTrue;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/LRUPolicyTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/LRUPolicyTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/LRUPolicyTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -2,12 +2,12 @@
import org.jboss.cache.*;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/MRUPolicyTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/MRUPolicyTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/MRUPolicyTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -8,12 +8,12 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/NullEvictionPolicyTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/NullEvictionPolicyTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/NullEvictionPolicyTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -4,18 +4,16 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import java.util.List;
import java.util.ArrayList;
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/OptimisticEvictionTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/OptimisticEvictionTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/OptimisticEvictionTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -8,7 +8,7 @@
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.interceptors.EvictionInterceptor;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.transaction.DummyTransactionManagerLookup;
import org.jboss.cache.xml.XmlHelper;
import static org.testng.AssertJUnit.assertFalse;
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/ProgrammaticLRUPolicyTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/ProgrammaticLRUPolicyTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/ProgrammaticLRUPolicyTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -34,7 +34,7 @@
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.xml.XmlHelper;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/ReplicatedLRUPolicyTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/ReplicatedLRUPolicyTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/ReplicatedLRUPolicyTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -3,9 +3,9 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.notifications.annotation.CacheListener;
import org.jboss.cache.notifications.annotation.NodeEvicted;
import org.jboss.cache.notifications.event.Event;
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/minttl/FIFOMinTTLTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/minttl/FIFOMinTTLTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/minttl/FIFOMinTTLTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -1,9 +1,9 @@
package org.jboss.cache.eviction.minttl;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.eviction.EvictionPolicyConfigBase;
import org.jboss.cache.eviction.FIFOConfiguration;
-import org.jboss.cache.misc.TestingUtil;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/minttl/MRUMinTTLTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/minttl/MRUMinTTLTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/minttl/MRUMinTTLTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -2,9 +2,9 @@
import org.jboss.cache.CacheStatus;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.eviction.EvictionPolicyConfigBase;
import org.jboss.cache.eviction.MRUConfiguration;
-import org.jboss.cache.misc.TestingUtil;
import org.testng.annotations.Test;
/**
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/minttl/MinTTLTestBase.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/minttl/MinTTLTestBase.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/minttl/MinTTLTestBase.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -3,10 +3,10 @@
import org.jboss.cache.Cache;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.eviction.EvictionPolicyConfigBase;
-import org.jboss.cache.misc.TestingUtil;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/factories/InterceptorChainFactoryTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/factories/InterceptorChainFactoryTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/factories/InterceptorChainFactoryTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -8,7 +8,7 @@
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.interceptors.*;
import org.jboss.cache.interceptors.base.CommandInterceptor;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.xml.XmlHelper;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertNotNull;
Modified: core/trunk/src/test/java/org/jboss/cache/factories/LateConfigurationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/factories/LateConfigurationTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/factories/LateConfigurationTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -3,6 +3,7 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.BuddyReplicationConfig;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.config.Configuration;
@@ -10,7 +11,6 @@
import org.jboss.cache.loader.DummyInMemoryCacheLoader;
import org.jboss.cache.marshall.AbstractMarshaller;
import org.jboss.cache.marshall.VersionAwareMarshaller;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.DummyTransactionManager;
import org.jboss.cache.transaction.DummyTransactionManagerLookup;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/factories/LifeCycleTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/factories/LifeCycleTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/factories/LifeCycleTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -8,8 +8,8 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.ReplicationException;
import org.jboss.cache.SuspectException;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.notifications.annotation.CacheListener;
import org.jboss.cache.notifications.annotation.CacheStarted;
import org.jboss.cache.notifications.annotation.CacheStopped;
Modified: core/trunk/src/test/java/org/jboss/cache/interceptors/EvictionInterceptorTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/interceptors/EvictionInterceptorTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/interceptors/EvictionInterceptorTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -13,6 +13,7 @@
import org.jboss.cache.NodeSPI;
import org.jboss.cache.Region;
import org.jboss.cache.RegionManager;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.commands.VisitableCommand;
import org.jboss.cache.commands.read.GetKeyValueCommand;
import org.jboss.cache.commands.read.GetNodeCommand;
@@ -28,7 +29,6 @@
import org.jboss.cache.eviction.NodeEventType;
import org.jboss.cache.factories.CommandsFactory;
import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/interceptors/LegacyInterceptorTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/interceptors/LegacyInterceptorTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/interceptors/LegacyInterceptorTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -5,8 +5,8 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.InvocationContext;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.commands.write.PutKeyValueCommand;
-import org.jboss.cache.misc.TestingUtil;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeTest;
Modified: core/trunk/src/test/java/org/jboss/cache/interceptors/MarshalledValueInterceptorTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/interceptors/MarshalledValueInterceptorTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/interceptors/MarshalledValueInterceptorTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -4,7 +4,7 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.marshall.MarshalledValueHelper;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.util.CachePrinter;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/invalidation/InvalidationInterceptorTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/invalidation/InvalidationInterceptorTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/invalidation/InvalidationInterceptorTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -13,10 +13,10 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
import org.jboss.cache.NodeSPI;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.XmlConfigurationParser;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.optimistic.DefaultDataVersion;
import org.jboss.cache.xml.XmlHelper;
import static org.testng.AssertJUnit.*;
Modified: core/trunk/src/test/java/org/jboss/cache/invalidation/TombstoneEvictionTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/invalidation/TombstoneEvictionTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/invalidation/TombstoneEvictionTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -3,11 +3,11 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.eviction.FIFOConfiguration;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.DummyTransactionManagerLookup;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
@@ -16,7 +16,6 @@
import org.apache.commons.logging.LogFactory;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.List;
/**
Modified: core/trunk/src/test/java/org/jboss/cache/invalidation/VersionInconsistencyTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/invalidation/VersionInconsistencyTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/invalidation/VersionInconsistencyTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -2,7 +2,7 @@
import org.jboss.cache.*;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.optimistic.DefaultDataVersion;
import org.jboss.cache.transaction.DummyTransactionManagerLookup;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/jmx/CacheJmxWrapperTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/jmx/CacheJmxWrapperTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/jmx/CacheJmxWrapperTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -6,7 +6,7 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.Configuration.CacheMode;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.notifications.annotation.CacheListener;
import org.jboss.cache.notifications.annotation.CacheStarted;
import org.jboss.cache.notifications.annotation.CacheStopped;
Modified: core/trunk/src/test/java/org/jboss/cache/loader/AdjListJDBCCacheLoaderCompatibilityTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/AdjListJDBCCacheLoaderCompatibilityTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/loader/AdjListJDBCCacheLoaderCompatibilityTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -3,10 +3,10 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.marshall.NodeData;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.statetransfer.StateTransferManager;
import org.jboss.cache.xml.XmlHelper;
import org.jboss.util.stream.MarshalledValueInputStream;
Modified: core/trunk/src/test/java/org/jboss/cache/loader/BdbjeCacheLoaderTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/BdbjeCacheLoaderTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/loader/BdbjeCacheLoaderTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -1,7 +1,7 @@
package org.jboss.cache.loader;
import org.jboss.cache.Fqn;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.assertEquals;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderMethodCallCounterTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderMethodCallCounterTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderMethodCallCounterTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -8,7 +8,7 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.assertEquals;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderWithReplicationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderWithReplicationTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderWithReplicationTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -10,8 +10,8 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertNull;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/loader/ChainingCacheLoaderBasicTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/ChainingCacheLoaderBasicTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/loader/ChainingCacheLoaderBasicTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -8,7 +8,7 @@
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.factories.XmlConfigurationParser;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.xml.XmlHelper;
import org.testng.annotations.Test;
import org.w3c.dom.Element;
Modified: core/trunk/src/test/java/org/jboss/cache/loader/ClusteredCacheLoaderTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/ClusteredCacheLoaderTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/loader/ClusteredCacheLoaderTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -12,9 +12,9 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.Region;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.lock.TimeoutException;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/loader/FileCacheLoaderTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/FileCacheLoaderTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/loader/FileCacheLoaderTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -1,7 +1,7 @@
package org.jboss.cache.loader;
import org.jboss.cache.Fqn;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.assertEquals;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/loader/JdbmCacheLoaderTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/JdbmCacheLoaderTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/loader/JdbmCacheLoaderTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -1,6 +1,6 @@
package org.jboss.cache.loader;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.testng.annotations.Test;
/**
Modified: core/trunk/src/test/java/org/jboss/cache/loader/SingletonStoreCacheLoaderTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/SingletonStoreCacheLoaderTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/loader/SingletonStoreCacheLoaderTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -11,11 +11,11 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.internals.ViewChangeListener;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.factories.XmlConfigurationParser;
-import org.jboss.cache.misc.ViewChangeListener;
import org.jboss.cache.xml.XmlHelper;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheLoaderTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheLoaderTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheLoaderTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -3,11 +3,11 @@
import org.jboss.cache.CacheException;
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.interceptors.OrderedSynchronizationHandler;
import org.jboss.cache.loader.tcp.TcpCacheServer;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.notifications.annotation.CacheListener;
import org.jboss.cache.notifications.annotation.NodeCreated;
import org.jboss.cache.notifications.event.Event;
Modified: core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheServerTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheServerTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheServerTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -4,13 +4,13 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.jmx.CacheJmxWrapper;
import org.jboss.cache.loader.tcp.TcpCacheServer;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.xml.XmlHelper;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/loader/TxCacheLoaderTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/TxCacheLoaderTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/loader/TxCacheLoaderTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -3,7 +3,7 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.transaction.TransactionSetup;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/lock/AcquireAllTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/lock/AcquireAllTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/lock/AcquireAllTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -4,8 +4,8 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.NodeSPI;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.DummyTransactionManagerLookup;
import static org.testng.AssertJUnit.assertEquals;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/lock/BreakDeadMemberLocksTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/lock/BreakDeadMemberLocksTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/lock/BreakDeadMemberLocksTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -25,9 +25,9 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertTrue;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/lock/IdentityLockTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/lock/IdentityLockTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/lock/IdentityLockTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -10,7 +10,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.NodeSPI;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.transaction.GlobalTransaction;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/lock/LockTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/lock/LockTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/lock/LockTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -7,7 +7,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/lock/NonBlockingWriterLockTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/lock/NonBlockingWriterLockTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/lock/NonBlockingWriterLockTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -1,6 +1,6 @@
package org.jboss.cache.lock;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.assertTrue;
import static org.testng.AssertJUnit.fail;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/lock/ReadWriteLockWithUpgradeTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/lock/ReadWriteLockWithUpgradeTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/lock/ReadWriteLockWithUpgradeTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -1,6 +1,6 @@
package org.jboss.cache.lock;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.assertTrue;
import static org.testng.AssertJUnit.fail;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/lock/ReentrantWriterPreferenceReadWriteLockTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/lock/ReentrantWriterPreferenceReadWriteLockTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/lock/ReentrantWriterPreferenceReadWriteLockTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -1,6 +1,6 @@
package org.jboss.cache.lock;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/lock/pessimistic/ConcurrentPutRemoveTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/lock/pessimistic/ConcurrentPutRemoveTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/lock/pessimistic/ConcurrentPutRemoveTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -5,9 +5,9 @@
import org.jboss.cache.Cache;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.DummyTransactionManagerLookup;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/ActiveInactiveTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/ActiveInactiveTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/ActiveInactiveTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -12,11 +12,11 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.Region;
import org.jboss.cache.RegionManager;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.commands.ReplicableCommand;
import org.jboss.cache.commands.remote.ReplicateCommand;
import org.jboss.cache.commands.write.PutKeyValueCommand;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/AsyncReplTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/AsyncReplTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/AsyncReplTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -17,7 +17,7 @@
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.marshall.data.Address;
import org.jboss.cache.marshall.data.Person;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/CacheLoaderMarshallingJDBCTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/CacheLoaderMarshallingJDBCTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/CacheLoaderMarshallingJDBCTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -4,6 +4,7 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.Region;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
import org.jboss.cache.config.Configuration;
@@ -12,7 +13,6 @@
import org.jboss.cache.eviction.LRUConfiguration;
import org.jboss.cache.eviction.LRUPolicy;
import org.jboss.cache.loader.JDBCCacheLoaderConfig;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.assertEquals;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/CacheLoaderMarshallingTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/CacheLoaderMarshallingTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/CacheLoaderMarshallingTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -12,7 +12,7 @@
import org.jboss.cache.eviction.LRUConfiguration;
import org.jboss.cache.eviction.LRUPolicy;
import org.jboss.cache.loader.FileCacheLoaderConfig;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.assertEquals;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/InvalidRegionForStateTransferTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/InvalidRegionForStateTransferTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/InvalidRegionForStateTransferTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -4,9 +4,9 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.Region;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.misc.TestingUtil;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/MarshalledValueTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/MarshalledValueTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/MarshalledValueTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -5,6 +5,7 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.InvocationContext;
import org.jboss.cache.NodeSPI;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.commands.write.PutDataMapCommand;
import org.jboss.cache.commands.write.PutKeyValueCommand;
import org.jboss.cache.config.CacheLoaderConfig;
@@ -15,7 +16,6 @@
import org.jboss.cache.interceptors.base.CommandInterceptor;
import org.jboss.cache.invocation.CacheInvocationDelegate;
import org.jboss.cache.loader.DummyInMemoryCacheLoader;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.notifications.annotation.CacheListener;
import org.jboss.cache.notifications.annotation.NodeModified;
import org.jboss.cache.notifications.event.NodeModifiedEvent;
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/RegionManagerTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/RegionManagerTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/RegionManagerTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -5,8 +5,8 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.Region;
import org.jboss.cache.RegionManager;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/ReplicateToInactiveRegionTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/ReplicateToInactiveRegionTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/ReplicateToInactiveRegionTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -4,7 +4,7 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.Region;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/ReturnValueMarshallingTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/ReturnValueMarshallingTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/ReturnValueMarshallingTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -11,7 +11,7 @@
import org.jboss.cache.commands.remote.ClusteredGetCommand;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.CommandsFactory;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/SyncReplTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/SyncReplTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/SyncReplTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -13,11 +13,11 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.Region;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.marshall.data.Address;
import org.jboss.cache.marshall.data.Person;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/mgmt/CacheLoaderTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/mgmt/CacheLoaderTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/mgmt/CacheLoaderTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -2,7 +2,7 @@
import org.jboss.cache.interceptors.CacheLoaderInterceptor;
import org.jboss.cache.interceptors.CacheStoreInterceptor;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/mgmt/InvalidationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/mgmt/InvalidationTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/mgmt/InvalidationTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -3,11 +3,11 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.interceptors.InvalidationInterceptor;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/mgmt/PassivationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/mgmt/PassivationTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/mgmt/PassivationTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -9,7 +9,7 @@
import org.jboss.cache.interceptors.ActivationInterceptor;
import org.jboss.cache.interceptors.PassivationInterceptor;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
/**
* Simple functional tests for ActivationInterceptor and PassivationInterceptor statistics
Modified: core/trunk/src/test/java/org/jboss/cache/notifications/BuddyGroupChangeNotificationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/notifications/BuddyGroupChangeNotificationTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/notifications/BuddyGroupChangeNotificationTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -3,11 +3,11 @@
import org.jboss.cache.Cache;
import org.jboss.cache.CacheFactory;
import org.jboss.cache.DefaultCacheFactory;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.buddyreplication.BuddyGroup;
import org.jboss.cache.buddyreplication.BuddyReplicationTestsBase;
import org.jboss.cache.config.BuddyReplicationConfig;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.notifications.annotation.BuddyGroupChanged;
import org.jboss.cache.notifications.annotation.CacheListener;
import org.jboss.cache.notifications.annotation.ViewChanged;
Modified: core/trunk/src/test/java/org/jboss/cache/notifications/NotificationThreadTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/notifications/NotificationThreadTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/notifications/NotificationThreadTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -7,7 +7,7 @@
import org.jboss.cache.config.Configuration;
import org.jboss.cache.loader.AbstractCacheLoaderTestBase;
import org.jboss.cache.loader.DummyInMemoryCacheLoader;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.notifications.annotation.*;
import org.jboss.cache.notifications.event.Event;
import org.jboss.cache.transaction.DummyTransactionManagerLookup;
Modified: core/trunk/src/test/java/org/jboss/cache/notifications/RemoteCacheListenerTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/notifications/RemoteCacheListenerTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/notifications/RemoteCacheListenerTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -31,7 +31,7 @@
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.ComponentRegistry;
import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.notifications.event.Event;
import static org.jboss.cache.notifications.event.Event.Type.*;
import org.jboss.cache.notifications.event.EventImpl;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/AbstractOptimisticTestCase.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/AbstractOptimisticTestCase.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/AbstractOptimisticTestCase.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -7,6 +7,7 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.commands.ReversibleCommand;
import org.jboss.cache.commands.VersionedDataCommand;
import org.jboss.cache.config.CacheLoaderConfig;
@@ -24,7 +25,6 @@
import org.jboss.cache.loader.DummySharedInMemoryCacheLoader;
import org.jboss.cache.lock.IsolationLevel;
import org.jboss.cache.marshall.MethodCall;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.DummyTransactionManagerLookup;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.TransactionSetup;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/AsyncCacheTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/AsyncCacheTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/AsyncCacheTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -8,7 +8,7 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.loader.SamplePojo;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.transaction.TransactionSetup;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/CacheTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/CacheTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/CacheTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -10,13 +10,13 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.NodeSPI;
import org.jboss.cache.VersionedNode;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.commands.ReversibleCommand;
import org.jboss.cache.commands.tx.CommitCommand;
import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
import org.jboss.cache.commands.tx.RollbackCommand;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.invocation.NodeInvocationDelegate;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
import org.jboss.cache.transaction.TransactionTable;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/ConcurrentTransactionTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/ConcurrentTransactionTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/ConcurrentTransactionTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -10,12 +10,12 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.InvocationContext;
import org.jboss.cache.NodeSPI;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.commands.VisitableCommand;
import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
import org.jboss.cache.interceptors.TxInterceptor;
import org.jboss.cache.interceptors.base.CommandInterceptor;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/DataVersionTransferTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/DataVersionTransferTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/DataVersionTransferTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -4,8 +4,8 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.NodeSPI;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.DummyTransactionManagerLookup;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorGetChildrenNamesTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorGetChildrenNamesTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorGetChildrenNamesTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -2,12 +2,12 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.factories.ComponentRegistry;
import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
import org.jboss.cache.interceptors.base.CommandInterceptor;
import org.jboss.cache.loader.SamplePojo;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
import org.jboss.cache.transaction.TransactionTable;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorGetKeyValTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorGetKeyValTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorGetKeyValTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -2,11 +2,11 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
import org.jboss.cache.interceptors.base.CommandInterceptor;
import org.jboss.cache.loader.SamplePojo;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
import org.jboss.cache.transaction.TransactionTable;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorGetKeysTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorGetKeysTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorGetKeysTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -2,11 +2,11 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
import org.jboss.cache.interceptors.base.CommandInterceptor;
import org.jboss.cache.loader.SamplePojo;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
import org.jboss.cache.transaction.TransactionTable;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorKeyValTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorKeyValTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorKeyValTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -2,11 +2,11 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
import org.jboss.cache.interceptors.base.CommandInterceptor;
import org.jboss.cache.loader.SamplePojo;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
import org.jboss.cache.transaction.TransactionTable;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorPutEraseTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorPutEraseTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorPutEraseTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -2,11 +2,11 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
import org.jboss.cache.interceptors.base.CommandInterceptor;
import org.jboss.cache.loader.SamplePojo;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
import org.jboss.cache.transaction.TransactionTable;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorPutMapTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorPutMapTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorPutMapTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -6,7 +6,7 @@
import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
import org.jboss.cache.interceptors.base.CommandInterceptor;
import org.jboss.cache.loader.SamplePojo;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
import org.jboss.cache.transaction.TransactionTable;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorRemoveDataTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorRemoveDataTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorRemoveDataTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -2,11 +2,11 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
import org.jboss.cache.interceptors.base.CommandInterceptor;
import org.jboss.cache.loader.SamplePojo;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
import org.jboss.cache.transaction.TransactionTable;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorRemoveKeyValTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorRemoveKeyValTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorRemoveKeyValTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -8,11 +8,11 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
import org.jboss.cache.interceptors.base.CommandInterceptor;
import org.jboss.cache.loader.SamplePojo;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
import org.jboss.cache.transaction.TransactionTable;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorTransactionTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorTransactionTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorTransactionTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -7,10 +7,10 @@
package org.jboss.cache.optimistic;
import org.jboss.cache.CacheSPI;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
import org.jboss.cache.interceptors.base.CommandInterceptor;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/OptimisticCreateIfNotExistsInterceptorTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/OptimisticCreateIfNotExistsInterceptorTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/OptimisticCreateIfNotExistsInterceptorTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -12,7 +12,7 @@
import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
import org.jboss.cache.interceptors.base.CommandInterceptor;
import org.jboss.cache.loader.SamplePojo;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.transaction.DummyTransactionManager;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/OptimisticLockInterceptorTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/OptimisticLockInterceptorTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/OptimisticLockInterceptorTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -4,6 +4,7 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.InvocationContext;
import org.jboss.cache.NodeSPI;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.commands.VisitableCommand;
import org.jboss.cache.interceptors.OptimisticInterceptor;
import org.jboss.cache.interceptors.OptimisticLockingInterceptor;
@@ -11,7 +12,6 @@
import static org.jboss.cache.lock.LockType.READ;
import static org.jboss.cache.lock.LockType.WRITE;
import org.jboss.cache.lock.NodeLock;
-import org.jboss.cache.misc.TestingUtil;
import org.testng.AssertJUnit;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/OptimisticReplicationInterceptorTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/OptimisticReplicationInterceptorTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/OptimisticReplicationInterceptorTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -7,13 +7,13 @@
package org.jboss.cache.optimistic;
import org.jboss.cache.CacheSPI;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.commands.ReversibleCommand;
import org.jboss.cache.commands.tx.CommitCommand;
import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
import org.jboss.cache.commands.tx.RollbackCommand;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.loader.SamplePojo;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.DummyTransactionManager;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/RemoveBeforeCreateTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/RemoveBeforeCreateTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/RemoveBeforeCreateTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -3,8 +3,8 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
import org.jboss.cache.NodeSPI;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertNull;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/ThreadedOptimisticCreateIfNotExistsInterceptorTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/ThreadedOptimisticCreateIfNotExistsInterceptorTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/ThreadedOptimisticCreateIfNotExistsInterceptorTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -8,10 +8,10 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
import org.jboss.cache.interceptors.base.CommandInterceptor;
import org.jboss.cache.loader.SamplePojo;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.DummyTransactionManager;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
import static org.testng.AssertJUnit.assertEquals;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/TxInterceptorTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/TxInterceptorTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/TxInterceptorTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -7,12 +7,12 @@
package org.jboss.cache.optimistic;
import org.jboss.cache.CacheSPI;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.commands.ReversibleCommand;
import org.jboss.cache.commands.tx.CommitCommand;
import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
import org.jboss.cache.commands.tx.RollbackCommand;
import org.jboss.cache.loader.SamplePojo;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
import org.jboss.cache.transaction.TransactionSetup;
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/ValidatorInterceptorTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/ValidatorInterceptorTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/ValidatorInterceptorTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -20,7 +20,7 @@
import org.jboss.cache.interceptors.OptimisticValidatorInterceptor;
import org.jboss.cache.interceptors.base.CommandInterceptor;
import org.jboss.cache.loader.SamplePojo;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
import org.jboss.cache.transaction.TransactionTable;
Modified: core/trunk/src/test/java/org/jboss/cache/options/CacheModeLocalSimpleTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/options/CacheModeLocalSimpleTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/options/CacheModeLocalSimpleTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -9,9 +9,9 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.Option;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertNull;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/options/ExplicitVersionsReplTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/options/ExplicitVersionsReplTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/options/ExplicitVersionsReplTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -5,7 +5,7 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.NodeSPI;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.optimistic.DataVersion;
import org.jboss.cache.optimistic.DefaultDataVersion;
import static org.testng.AssertJUnit.*;
Modified: core/trunk/src/test/java/org/jboss/cache/options/ForceCacheModeTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/options/ForceCacheModeTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/options/ForceCacheModeTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -12,11 +12,11 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.config.Configuration.NodeLockingScheme;
import org.jboss.cache.config.Option;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.notifications.annotation.CacheListener;
import org.jboss.cache.notifications.annotation.NodeEvicted;
import org.jboss.cache.notifications.annotation.NodeModified;
Modified: core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/AsyncInvalidationOptLocksTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/AsyncInvalidationOptLocksTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/AsyncInvalidationOptLocksTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -7,7 +7,7 @@
package org.jboss.cache.options.cachemodelocal;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
public class AsyncInvalidationOptLocksTest extends CacheModeLocalTestBase
{
Modified: core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/AsyncInvalidationPessLocksTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/AsyncInvalidationPessLocksTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/AsyncInvalidationPessLocksTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -7,7 +7,7 @@
package org.jboss.cache.options.cachemodelocal;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.testng.annotations.Test;
@Test(groups = "functional")
Modified: core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/AsyncReplOptLocksTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/AsyncReplOptLocksTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/AsyncReplOptLocksTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -7,7 +7,7 @@
package org.jboss.cache.options.cachemodelocal;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.testng.annotations.Test;
@Test(groups = {"functional", "jgroups"})
Modified: core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/AsyncReplPessLocksTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/AsyncReplPessLocksTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/AsyncReplPessLocksTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -7,7 +7,7 @@
package org.jboss.cache.options.cachemodelocal;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.testng.annotations.Test;
@Test(groups = {"functional", "jgroups"})
Modified: core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/SyncReplOptLocksTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/SyncReplOptLocksTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/options/cachemodelocal/SyncReplOptLocksTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -7,7 +7,7 @@
package org.jboss.cache.options.cachemodelocal;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.testng.annotations.Test;
@Test(groups = {"functional", "jgroups"})
Modified: core/trunk/src/test/java/org/jboss/cache/passivation/BasicPassivationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/passivation/BasicPassivationTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/passivation/BasicPassivationTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -13,7 +13,7 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.loader.DummyInMemoryCacheLoader;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.notifications.annotation.CacheListener;
import org.jboss.cache.notifications.annotation.NodeActivated;
import org.jboss.cache.notifications.annotation.NodePassivated;
Modified: core/trunk/src/test/java/org/jboss/cache/passivation/LocalPassivationIntegrationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/passivation/LocalPassivationIntegrationTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/passivation/LocalPassivationIntegrationTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -15,7 +15,7 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.loader.DummyInMemoryCacheLoader;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.notifications.annotation.CacheListener;
import org.jboss.cache.notifications.annotation.NodeActivated;
import org.jboss.cache.notifications.annotation.NodeLoaded;
Modified: core/trunk/src/test/java/org/jboss/cache/passivation/PassivationTestsBase.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/passivation/PassivationTestsBase.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/passivation/PassivationTestsBase.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -14,7 +14,7 @@
import org.jboss.cache.loader.CacheLoader;
import org.jboss.cache.loader.SamplePojo;
import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.statetransfer.StateTransferManager;
import org.jboss.cache.transaction.DummyTransactionManager;
import org.jboss.cache.xml.XmlHelper;
Modified: core/trunk/src/test/java/org/jboss/cache/passivation/ReplicatedPassivationIntegrationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/passivation/ReplicatedPassivationIntegrationTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/passivation/ReplicatedPassivationIntegrationTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -29,6 +29,7 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.xml.XmlHelper;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.EvictionConfig;
@@ -36,7 +37,6 @@
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.loader.DummyInMemoryCacheLoader;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.notifications.annotation.CacheListener;
import org.jboss.cache.notifications.annotation.NodeActivated;
import org.jboss.cache.notifications.annotation.NodeLoaded;
Modified: core/trunk/src/test/java/org/jboss/cache/profiling/ProfileTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/profiling/ProfileTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/profiling/ProfileTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -3,9 +3,9 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.BuddyReplicationConfig;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.DummyTransactionManagerLookup;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/replicated/AsyncReplTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/replicated/AsyncReplTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/replicated/AsyncReplTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -12,9 +12,9 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/replicated/ExceptionTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/replicated/ExceptionTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/replicated/ExceptionTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -3,10 +3,10 @@
import org.jboss.cache.Cache;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.lock.TimeoutException;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.DummyTransactionManagerLookup;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/replicated/SyncReplTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/replicated/SyncReplTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/replicated/SyncReplTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -16,7 +16,7 @@
import org.jboss.cache.config.Option;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.invocation.CacheInvocationDelegate;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/replicated/SyncReplTxTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/replicated/SyncReplTxTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/replicated/SyncReplTxTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -17,7 +17,7 @@
import org.jboss.cache.config.Configuration;
import org.jboss.cache.lock.IsolationLevel;
import org.jboss.cache.lock.TimeoutException;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.notifications.annotation.CacheListener;
import org.jboss.cache.notifications.annotation.NodeModified;
import org.jboss.cache.notifications.event.NodeEvent;
Modified: core/trunk/src/test/java/org/jboss/cache/statetransfer/FailedStateTransferTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/statetransfer/FailedStateTransferTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/statetransfer/FailedStateTransferTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -26,12 +26,12 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Version;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.ComponentRegistry;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.factories.annotations.NonVolatile;
import org.jboss.cache.lock.TimeoutException;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.remoting.jgroups.ChannelMessageListener;
import static org.testng.AssertJUnit.fail;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/statetransfer/ForcedStateTransferTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/statetransfer/ForcedStateTransferTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/statetransfer/ForcedStateTransferTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -26,7 +26,7 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
import org.jboss.cache.Version;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.notifications.annotation.CacheListener;
import org.jboss.cache.notifications.annotation.NodeModified;
import org.jboss.cache.notifications.event.NodeEvent;
Modified: core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransfer200Test.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransfer200Test.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransfer200Test.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -11,12 +11,12 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
import org.jboss.cache.Region;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.buddyreplication.BuddyFqnTransformer;
import org.jboss.cache.buddyreplication.BuddyManager;
import org.jboss.cache.config.BuddyReplicationConfig;
import org.jboss.cache.loader.CacheLoader;
import org.jboss.cache.marshall.MarshalledValue;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.Test;
Modified: core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferConcurrencyTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferConcurrencyTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferConcurrencyTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -12,7 +12,7 @@
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.marshall.InactiveRegionException;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.util.internals.EvictionController;
import org.jboss.cache.util.internals.ReplicationQueueNotifier;
import static org.testng.AssertJUnit.*;
Modified: core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferTestBase.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferTestBase.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferTestBase.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -27,13 +27,13 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.Region;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.loader.AbstractCacheLoaderTestBase;
import org.jboss.cache.loader.CacheLoader;
import org.jboss.cache.marshall.SelectedClassnameClassLoader;
-import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertFalse;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferUnderLoadTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferUnderLoadTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferUnderLoadTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -4,8 +4,8 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.DummyTransactionManager;
import org.testng.AssertJUnit;
import org.testng.annotations.AfterMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/transaction/AbortionTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/transaction/AbortionTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/transaction/AbortionTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -8,8 +8,8 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.interceptors.OrderedSynchronizationHandler;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.NotifyingTransactionManager.Notification;
import org.jgroups.JChannel;
import static org.testng.AssertJUnit.*;
Modified: core/trunk/src/test/java/org/jboss/cache/transaction/ConcurrentBankTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/transaction/ConcurrentBankTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/transaction/ConcurrentBankTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -11,7 +11,7 @@
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.lock.IsolationLevel;
import org.jboss.cache.lock.TimeoutException;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.util.CachePrinter;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.fail;
Modified: core/trunk/src/test/java/org/jboss/cache/transaction/DeadlockTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/transaction/DeadlockTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/transaction/DeadlockTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -19,7 +19,7 @@
import org.jboss.cache.lock.IsolationLevel;
import org.jboss.cache.lock.TimeoutException;
import org.jboss.cache.lock.UpgradeException;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.util.CachePrinter;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/trunk/src/test/java/org/jboss/cache/transaction/InvocationContextCleanupTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/transaction/InvocationContextCleanupTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/transaction/InvocationContextCleanupTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -10,7 +10,7 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.interceptors.OrderedSynchronizationHandler;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.util.CachePrinter;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertTrue;
Modified: core/trunk/src/test/java/org/jboss/cache/transaction/PrepareCommitContentionTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/transaction/PrepareCommitContentionTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/transaction/PrepareCommitContentionTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -11,7 +11,7 @@
import static org.jboss.cache.config.Configuration.CacheMode.REPL_SYNC;
import org.jboss.cache.factories.ComponentRegistry;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jgroups.Address;
import org.jgroups.Channel;
import org.jgroups.blocks.RspFilter;
Modified: core/trunk/src/test/java/org/jboss/cache/transaction/SimultaneousRollbackAndPutTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/transaction/SimultaneousRollbackAndPutTest.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/transaction/SimultaneousRollbackAndPutTest.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -7,7 +7,7 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.invocation.CacheInvocationDelegate;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.util.CachePrinter;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.AfterTest;
Copied: core/trunk/src/test/java/org/jboss/cache/util/TestingUtil.java (from rev 5882, core/trunk/src/test/java/org/jboss/cache/misc/TestingUtil.java)
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/util/TestingUtil.java (rev 0)
+++ core/trunk/src/test/java/org/jboss/cache/util/TestingUtil.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -0,0 +1,636 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+
+package org.jboss.cache.util;
+
+import org.jboss.cache.Cache;
+import org.jboss.cache.CacheSPI;
+import org.jboss.cache.CacheStatus;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.lock.LockManager;
+import org.jboss.cache.commands.VisitableCommand;
+import org.jboss.cache.factories.CommandsFactory;
+import org.jboss.cache.factories.ComponentRegistry;
+import org.jboss.cache.interceptors.InterceptorChain;
+import org.jboss.cache.interceptors.base.CommandInterceptor;
+import org.jboss.cache.invocation.CacheInvocationDelegate;
+import org.jboss.cache.loader.CacheLoader;
+import org.jboss.cache.loader.CacheLoaderManager;
+import org.jboss.cache.util.CachePrinter;
+import org.jgroups.JChannel;
+
+import java.io.File;
+import java.lang.reflect.Field;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Random;
+
+/**
+ * Utilities for unit testing JBossCache.
+ *
+ * @author <a href="mailto://brian.stansberry@jboss.com">Brian Stansberry</a>
+ * @version $Revision$
+ */
+public class TestingUtil
+{
+ private static Random random = new Random();
+
+ /**
+ * Extracts the value of a field in a given target instance using reflection, able to extract private fields as well.
+ *
+ * @param target object to extract field from
+ * @param fieldName name of field to extract
+ * @return field value
+ */
+ public static Object extractField(Object target, String fieldName)
+ {
+ return extractField(target.getClass(), target, fieldName);
+ }
+
+ public static void replaceField(Object newValue, String fieldName, Object owner, Class baseType)
+ {
+ Field field;
+ try
+ {
+ field = baseType.getDeclaredField(fieldName);
+ field.setAccessible(true);
+ field.set(owner, newValue);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);//just to simplify exception handeling
+ }
+ }
+
+
+ public static Object extractField(Class type, Object target, String fieldName)
+ {
+ Field field;
+ try
+ {
+ field = type.getDeclaredField(fieldName);
+ field.setAccessible(true);
+ return field.get(target);
+ }
+ catch (Exception e)
+ {
+ if (type.equals(Object.class))
+ {
+ e.printStackTrace();
+ return null;
+ }
+ else
+ {
+ // try with superclass!!
+ return extractField(type.getSuperclass(), target, fieldName);
+ }
+ }
+ }
+
+ public static <T extends CommandInterceptor> T findInterceptor(CacheSPI<?, ?> cache, Class<T> interceptorToFind)
+ {
+ for (CommandInterceptor i : cache.getInterceptorChain())
+ {
+ if (interceptorToFind.isInstance(i)) return interceptorToFind.cast(i);
+ }
+ return null;
+ }
+
+ /**
+ * Injects an interceptor after a specified interceptor in a running cache. Your new interceptor need not be
+ * initialised with pointers to the next interceptor, etc. as this method does all that for you, including calling
+ * setCache().
+ *
+ * @param cache running cache instance
+ * @param interceptorToInject interceptor instance to inject.
+ * @param interceptorAfterWhichToInject class of interceptor to search for in the chain and after which to add your interceptor
+ */
+ public static void injectInterceptor(CacheSPI<?, ?> cache, CommandInterceptor interceptorToInject, Class<? extends CommandInterceptor> interceptorAfterWhichToInject)
+ {
+ cache.addInterceptor(interceptorToInject, interceptorAfterWhichToInject);
+ }
+
+ /**
+ * Loops, continually calling {@link #areCacheViewsComplete(org.jboss.cache.Cache[])}
+ * until it either returns true or <code>timeout</code> ms have elapsed.
+ *
+ * @param caches caches which must all have consistent views
+ * @param timeout max number of ms to loop
+ * @throws RuntimeException if <code>timeout</code> ms have elapse without
+ * all caches having the same number of members.
+ */
+ public static void blockUntilViewsReceived(Cache[] caches, long timeout)
+ {
+ long failTime = System.currentTimeMillis() + timeout;
+
+ while (System.currentTimeMillis() < failTime)
+ {
+ sleepThread(100);
+ if (areCacheViewsComplete(caches))
+ {
+ return;
+ }
+ }
+
+ throw new RuntimeException("timed out before caches had complete views");
+ }
+
+ /**
+ * Version of blockUntilViewsReceived that uses varargs
+ */
+ public static void blockUntilViewsReceived(long timeout, Cache... caches)
+ {
+ blockUntilViewsReceived(caches, timeout);
+ }
+
+ /**
+ * Loops, continually calling {@link #areCacheViewsComplete(org.jboss.cache.CacheSPI[])}
+ * until it either returns true or <code>timeout</code> ms have elapsed.
+ *
+ * @param caches caches which must all have consistent views
+ * @param timeout max number of ms to loop
+ * @throws RuntimeException if <code>timeout</code> ms have elapse without
+ * all caches having the same number of members.
+ */
+ public static void blockUntilViewsReceived(CacheSPI[] caches, long timeout)
+ {
+ long failTime = System.currentTimeMillis() + timeout;
+
+ while (System.currentTimeMillis() < failTime)
+ {
+ sleepThread(100);
+ if (areCacheViewsComplete(caches))
+ {
+ return;
+ }
+ }
+
+ throw new RuntimeException("timed out before caches had complete views");
+ }
+
+
+ /**
+ * An overloaded version of {@link #blockUntilViewsReceived(long,org.jboss.cache.Cache[])} that allows for 'shrinking' clusters.
+ * I.e., the usual method barfs if there are more members than expected. This one takes a param (barfIfTooManyMembers) which,
+ * if false, will NOT barf but will wait until the cluster 'shrinks' to the desired size. Useful if in tests, you kill
+ * a member and want to wait until this fact is known across the cluster.
+ *
+ * @param timeout
+ * @param barfIfTooManyMembers
+ * @param caches
+ */
+ public static void blockUntilViewsReceived(long timeout, boolean barfIfTooManyMembers, Cache... caches)
+ {
+ long failTime = System.currentTimeMillis() + timeout;
+
+ while (System.currentTimeMillis() < failTime)
+ {
+ sleepThread(100);
+ if (areCacheViewsComplete(caches, barfIfTooManyMembers))
+ {
+ return;
+ }
+ }
+
+ throw new RuntimeException("timed out before caches had complete views");
+ }
+
+ /**
+ * Loops, continually calling {@link #areCacheViewsComplete(org.jboss.cache.CacheSPI[])}
+ * until it either returns true or <code>timeout</code> ms have elapsed.
+ *
+ * @param groupSize number of caches expected in the group
+ * @param timeout max number of ms to loop
+ * @throws RuntimeException if <code>timeout</code> ms have elapse without
+ * all caches having the same number of members.
+ */
+ public static void blockUntilViewReceived(CacheSPI cache, int groupSize, long timeout)
+ {
+ blockUntilViewReceived(cache, groupSize, timeout, true);
+ }
+
+ public static void blockUntilViewReceived(CacheSPI cache, int groupSize, long timeout, boolean barfIfTooManyMembersInView)
+ {
+ long failTime = System.currentTimeMillis() + timeout;
+
+ while (System.currentTimeMillis() < failTime)
+ {
+ sleepThread(100);
+ if (isCacheViewComplete(cache, groupSize, barfIfTooManyMembersInView))
+ {
+ return;
+ }
+ }
+
+ throw new RuntimeException("timed out before caches had complete views");
+ }
+
+ /**
+ * Checks each cache to see if the number of elements in the array
+ * returned by {@link CacheSPI#getMembers()} matches the size of
+ * the <code>caches</code> parameter.
+ *
+ * @param caches caches that should form a View
+ * @return <code>true</code> if all caches have
+ * <code>caches.length</code> members; false otherwise
+ * @throws IllegalStateException if any of the caches have MORE view
+ * members than caches.length
+ */
+ public static boolean areCacheViewsComplete(Cache[] caches)
+ {
+ return areCacheViewsComplete(caches, true);
+ }
+
+ public static boolean areCacheViewsComplete(Cache[] caches, boolean barfIfTooManyMembers)
+ {
+ int memberCount = caches.length;
+
+ for (int i = 0; i < memberCount; i++)
+ {
+ if (!isCacheViewComplete(caches[i], memberCount, barfIfTooManyMembers))
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Checks each cache to see if the number of elements in the array
+ * returned by {@link org.jboss.cache.RPCManager#getMembers()} matches the size of
+ * the <code>caches</code> parameter.
+ *
+ * @param caches caches that should form a View
+ * @return <code>true</code> if all caches have
+ * <code>caches.length</code> members; false otherwise
+ * @throws IllegalStateException if any of the caches have MORE view
+ * members than caches.length
+ */
+ public static boolean areCacheViewsComplete(CacheSPI[] caches)
+ {
+ if (caches == null) throw new NullPointerException("Cache impl array is null");
+ Cache[] c = new Cache[caches.length];
+ for (int i = 0; i < caches.length; i++) c[i] = caches[i];
+ return areCacheViewsComplete(c);
+ }
+
+ /**
+ * @param cache
+ * @param memberCount
+ */
+ public static boolean isCacheViewComplete(CacheSPI cache, int memberCount)
+ {
+ List members = cache.getRPCManager().getMembers();
+ if (members == null || memberCount > members.size())
+ {
+ return false;
+ }
+ else if (memberCount < members.size())
+ {
+ // This is an exceptional condition
+ StringBuffer sb = new StringBuffer("Cache at address ");
+ sb.append(cache.getRPCManager().getLocalAddress());
+ sb.append(" had ");
+ sb.append(members.size());
+ sb.append(" members; expecting ");
+ sb.append(memberCount);
+ sb.append(". Members were (");
+ for (int j = 0; j < members.size(); j++)
+ {
+ if (j > 0)
+ {
+ sb.append(", ");
+ }
+ sb.append(members.get(j));
+ }
+ sb.append(')');
+
+ throw new IllegalStateException(sb.toString());
+ }
+
+ return true;
+ }
+
+ /**
+ * @param c
+ * @param memberCount
+ */
+ public static boolean isCacheViewComplete(Cache c, int memberCount)
+ {
+ return isCacheViewComplete(c, memberCount, true);
+ }
+
+ public static boolean isCacheViewComplete(Cache c, int memberCount, boolean barfIfTooManyMembers)
+ {
+ CacheSPI cache = (CacheSPI) c;
+ List members = cache.getMembers();
+ if (members == null || memberCount > members.size())
+ {
+ return false;
+ }
+ else if (memberCount < members.size())
+ {
+ if (barfIfTooManyMembers)
+ {
+ // This is an exceptional condition
+ StringBuffer sb = new StringBuffer("Cache at address ");
+ sb.append(cache.getLocalAddress());
+ sb.append(" had ");
+ sb.append(members.size());
+ sb.append(" members; expecting ");
+ sb.append(memberCount);
+ sb.append(". Members were (");
+ for (int j = 0; j < members.size(); j++)
+ {
+ if (j > 0)
+ {
+ sb.append(", ");
+ }
+ sb.append(members.get(j));
+ }
+ sb.append(')');
+
+ throw new IllegalStateException(sb.toString());
+ }
+ else return false;
+ }
+
+ return true;
+ }
+
+
+ /**
+ * Puts the current thread to sleep for the desired number of ms, suppressing
+ * any exceptions.
+ *
+ * @param sleeptime number of ms to sleep
+ */
+ public static void sleepThread(long sleeptime)
+ {
+ try
+ {
+ Thread.sleep(sleeptime);
+ }
+ catch (InterruptedException ie)
+ {
+ }
+ }
+
+ public static void sleepRandom(int maxTime)
+ {
+ sleepThread(random.nextInt(maxTime));
+ }
+
+ public static void recursiveFileRemove(String directoryName)
+ {
+ File file = new File(directoryName);
+ recursiveFileRemove(file);
+ }
+
+ public static void recursiveFileRemove(File file)
+ {
+ if (file.exists())
+ {
+ System.out.println("Deleting file " + file);
+ recursivedelete(file);
+ }
+ }
+
+ private static void recursivedelete(File f)
+ {
+ if (f.isDirectory())
+ {
+ File[] files = f.listFiles();
+ for (File file : files)
+ {
+ recursivedelete(file);
+ }
+ }
+ //System.out.println("File " + f.toURI() + " deleted = " + f.delete());
+ f.delete();
+ }
+
+ /**
+ * Kills a cache - stops it, clears any data in any cache loaders, and rolls back any associated txs
+ */
+ public static void killCaches(Cache... caches)
+ {
+ for (Cache c : caches)
+ {
+ if (c != null && c.getCacheStatus() == CacheStatus.STARTED)
+ {
+ CacheSPI spi = (CacheSPI) c;
+ if (spi.getTransactionManager() != null)
+ {
+ try
+ {
+ spi.getTransactionManager().rollback();
+ }
+ catch (Exception e)
+ {
+ // don't care
+ }
+ }
+
+ CacheLoaderManager clm = spi.getCacheLoaderManager();
+ CacheLoader cl = clm == null ? null : clm.getCacheLoader();
+ if (cl != null)
+ {
+ try
+ {
+ cl.remove(Fqn.ROOT);
+ }
+ catch (Exception e)
+ {
+ // don't care
+ }
+ }
+
+ spi.stop();
+ spi.destroy();
+ }
+ }
+ }
+
+ /**
+ * Clears any associated transactions with the current thread in the caches' transaction managers.
+ */
+ public static void killTransactions(Cache... caches)
+ {
+ for (Cache c : caches)
+ {
+ if (c != null && c.getCacheStatus() == CacheStatus.STARTED)
+ {
+ CacheSPI ci = (CacheSPI) c;
+ if (ci.getTransactionManager() != null)
+ {
+ try
+ {
+ ci.getTransactionManager().rollback();
+ }
+ catch (Exception e)
+ {
+ // don't care
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * For testing only - introspects a cache and extracts the ComponentRegistry
+ *
+ * @param cache cache to introspect
+ * @return component registry
+ */
+ public static ComponentRegistry extractComponentRegistry(Cache cache)
+ {
+ return (ComponentRegistry) extractField(cache, "componentRegistry");
+ }
+
+ public static LockManager extractLockManager(Cache cache)
+ {
+ return extractComponentRegistry(cache).getComponent(LockManager.class);
+ }
+
+ /**
+ * For testing only - introspects a cache and extracts the ComponentRegistry
+ *
+ * @param ci interceptor chain to introspect
+ * @return component registry
+ */
+ public static ComponentRegistry extractComponentRegistry(InterceptorChain ci)
+ {
+ return (ComponentRegistry) extractField(ci, "componentRegistry");
+ }
+
+
+ /**
+ * Replaces the existing interceptor chain in the cache wih one represented by the interceptor passed in. This
+ * utility updates dependencies on all components that rely on the interceptor chain as well.
+ *
+ * @param cache cache that needs to be altered
+ * @param interceptor the first interceptor in the new chain.
+ */
+ public static void replaceInterceptorChain(CacheSPI<?, ?> cache, CommandInterceptor interceptor)
+ {
+ ComponentRegistry cr = extractComponentRegistry(cache);
+ // make sure all interceptors here are wired.
+ CommandInterceptor i = interceptor;
+ do
+ {
+ cr.wireDependencies(i);
+ }
+ while ((i = i.getNext()) != null);
+
+ InterceptorChain inch = cr.getComponent(InterceptorChain.class);
+ inch.setFirstInChain(interceptor);
+ }
+
+ /**
+ * Retrieves the remote delegate for a given cache. It is on this remote delegate that the JGroups RPCDispatcher
+ * invokes remote methods.
+ *
+ * @param cache cache instance for which a remote delegate is to be retrieved
+ * @return remote delegate, or null if the cacge is not configured for replication.
+ */
+ public static CacheInvocationDelegate getInvocationDelegate(CacheSPI cache)
+ {
+ ComponentRegistry cr = extractComponentRegistry(cache);
+ return cr.getComponent(CacheInvocationDelegate.class);
+ }
+
+ /**
+ * Blocks until the cache has reached a specified state.
+ *
+ * @param cache cache to watch
+ * @param cacheStatus status to wait for
+ * @param timeout timeout to wait for
+ */
+ public static void blockUntilCacheStatusAchieved(Cache cache, CacheStatus cacheStatus, long timeout)
+ {
+ CacheSPI spi = (CacheSPI) cache;
+ long killTime = System.currentTimeMillis() + timeout;
+ while (System.currentTimeMillis() < killTime)
+ {
+ if (spi.getCacheStatus() == cacheStatus) return;
+ sleepThread(50);
+ }
+ throw new RuntimeException("Timed out waiting for condition");
+ }
+
+ public static void replicateCommand(CacheSPI cache, VisitableCommand command) throws Throwable
+ {
+ ComponentRegistry cr = extractComponentRegistry(cache);
+ InterceptorChain ic = cr.getComponent(InterceptorChain.class);
+ ic.invoke(command);
+ }
+
+ public static void blockUntilViewsReceived(int timeout, List caches)
+ {
+ blockUntilViewsReceived((Cache[]) caches.toArray(new Cache[]{}), timeout);
+ }
+
+
+ public static CommandsFactory extractCommandsFactory(CacheSPI<Object, Object> cache)
+ {
+ return (CommandsFactory) extractField(cache, "commandsFactory");
+ }
+
+ public static String getJGroupsAttribute(Cache cache, String protocol, String attribute)
+ {
+ String s = ((JChannel) ((CacheSPI) cache).getRPCManager().getChannel()).getProperties();
+ String[] protocols = s.split(":");
+ String attribs = null;
+ for (String p : protocols)
+ {
+ boolean hasAttribs = p.contains("(");
+ String name = hasAttribs ? p.substring(0, p.indexOf('(')) : p;
+ attribs = hasAttribs ? p.substring(p.indexOf('(') + 1, p.length() - 1) : null;
+
+ if (name.equalsIgnoreCase(protocol)) break;
+ }
+
+ if (attribs != null)
+ {
+ String[] attrArray = attribs.split(";");
+ for (String a : attrArray)
+ {
+ String[] kvPairs = a.split("=");
+ if (kvPairs[0].equalsIgnoreCase(attribute)) return kvPairs[1];
+ }
+ }
+ return null;
+ }
+
+ public static void dumpCacheContents(List caches)
+ {
+ System.out.println("**** START: Cache Contents ****");
+ int count = 1;
+ for (Object o : caches)
+ {
+ CacheSPI c = (CacheSPI) o;
+ if (c == null)
+ {
+ System.out.println(" ** Cache " + count + " is null!");
+ }
+ else
+ {
+ System.out.println(" ** Cache " + count + " is " + c.getLocalAddress());
+ System.out.println(" " + CachePrinter.printCacheLockingInfo(c));
+ }
+ count++;
+ }
+ System.out.println("**** END: Cache Contents ****");
+ }
+
+ public static void dumpCacheContents(Cache... caches)
+ {
+ dumpCacheContents(Arrays.asList(caches));
+ }
+}
Property changes on: core/trunk/src/test/java/org/jboss/cache/util/TestingUtil.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: core/trunk/src/test/java/org/jboss/cache/util/internals/EvictionController.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/util/internals/EvictionController.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/util/internals/EvictionController.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -5,11 +5,11 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.Region;
import org.jboss.cache.RegionManager;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.eviction.EvictionTimerTask;
import org.jboss.cache.eviction.LRUConfiguration;
-import org.jboss.cache.misc.TestingUtil;
import java.lang.reflect.Method;
import java.util.Timer;
Added: core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationListener.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationListener.java (rev 0)
+++ core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationListener.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -0,0 +1,141 @@
+package org.jboss.cache.util.internals;
+
+import org.jboss.cache.Cache;
+import org.jboss.cache.RPCManager;
+import org.jboss.cache.commands.ReplicableCommand;
+import org.jboss.cache.commands.remote.ReplicateCommand;
+import org.jboss.cache.commands.tx.PrepareCommand;
+import org.jboss.cache.factories.ComponentRegistry;
+import org.jboss.cache.marshall.CommandAwareRpcDispatcher;
+import org.jboss.cache.util.TestingUtil;
+import org.jgroups.blocks.RpcDispatcher;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Utility class that notifies when certain commands were asynchronously replicated on secondary cache.
+ * Especially useful for avaoiding Thread.sleep() statements.
+ * <pre>
+ * Usage:
+ * Cache c1, c2; //these being two async caches
+ * AsyncReplicationListener listener2 = new AsyncReplicationListener(c2);
+ * listener2.expect(PutKeyValueCommand.class);
+ * c1.put(fqn, key, value);
+ * listener2.waitForReplicationToOccur(1000); // -this will block here untill c2 recieves the PutKeyValueCommand command
+ * </pre>
+ * Note: this class might be used aswell for sync caches, though it does not really make sence using it in these scenarios
+ *
+ * @author Mircea.Markus(a)jboss.com
+ * @since 2.2
+ */
+public class ReplicationListener
+{
+ private CountDownLatch latch = new CountDownLatch(1);
+ private Set expectedCommands;
+
+ /**
+ * Builds a listener that will observe the given cache for recieving replication commands.
+ */
+ public ReplicationListener(Cache cache)
+ {
+ ComponentRegistry componentRegistry = TestingUtil.extractComponentRegistry(cache);
+ RPCManager rpcManager = componentRegistry.getComponent(RPCManager.class);
+ CommandAwareRpcDispatcher realDispatcher = (CommandAwareRpcDispatcher) TestingUtil.extractField(rpcManager, "rpcDispatcher");
+ RpcDispatcher.Marshaller realMarshaller = (RpcDispatcher.Marshaller) TestingUtil.extractField(RpcDispatcher.class, realDispatcher, "req_marshaller");
+ MarshallerDelegate delegate = new MarshallerDelegate(realMarshaller);
+ TestingUtil.replaceField(delegate, "req_marshaller", realDispatcher, RpcDispatcher.class);
+ }
+
+ private class MarshallerDelegate implements RpcDispatcher.Marshaller
+ {
+ RpcDispatcher.Marshaller marshaller;
+
+ private MarshallerDelegate(RpcDispatcher.Marshaller maeshaller)
+ {
+ this.marshaller = maeshaller;
+ }
+
+ public byte[] objectToByteBuffer(Object obj) throws Exception
+ {
+ return marshaller.objectToByteBuffer(obj);
+ }
+
+ public Object objectFromByteBuffer(byte abyte0[]) throws Exception
+ {
+ Object result = marshaller.objectFromByteBuffer(abyte0);
+ System.out.println("Received result = " + result);
+ if (result instanceof ReplicateCommand && expectedCommands != null)
+ {
+ ReplicateCommand replicateCommand = (ReplicateCommand) result;
+ Iterator it = expectedCommands.iterator();
+ while (it.hasNext())
+ {
+ Class<? extends ReplicableCommand> replicableCommandClass = (Class<? extends ReplicableCommand>) it.next();
+ if (replicateCommand.containsCommandType(replicableCommandClass))
+ {
+ it.remove();
+ }
+ else if (replicateCommand.getSingleModification() instanceof PrepareCommand) //explicit transaction
+ {
+ PrepareCommand prepareCommand = (PrepareCommand) replicateCommand.getSingleModification();
+ if (prepareCommand.containsModificationType(replicableCommandClass))
+ {
+ it.remove();
+ }
+ }
+ }
+ if (expectedCommands.isEmpty())
+ {
+ latch.countDown();
+ }
+ }
+ return result;
+ }
+ }
+
+ /**
+ * Blocks for the elements specified through {@link #expect(Class[])} invocations to be replicated in this cache.
+ * if replication does not occur in the give timeout then an exception is being thrown.
+ */
+ public void waitForReplicationToOccur(long timeoutMillis)
+ {
+ assert expectedCommands != null : "there are no replication expectations; please use AsyncReplicationListener.expect(...) before calling this method";
+ try
+ {
+ if (!latch.await(timeoutMillis, TimeUnit.MILLISECONDS))
+ {
+ assert false : "waiting for more than " + timeoutMillis + " millis and following commands did not replicate: " + expectedCommands;
+ }
+ } catch (InterruptedException e)
+ {
+ throw new IllegalStateException("unexpected", e);
+ } finally
+ {
+ expectedCommands = null;
+ latch = new CountDownLatch(1);
+ }
+ }
+
+ /**
+ * {@link #waitForReplicationToOccur(long)} will block untill all the commands specified here are being replicated
+ * to this cache. The method can be called several times with various arguments.
+ */
+ public void expect(Class<? extends ReplicableCommand>... expectedCommands)
+ {
+ if (this.expectedCommands == null)
+ {
+ this.expectedCommands = new HashSet();
+ }
+ this.expectedCommands.addAll(Arrays.asList(expectedCommands));
+ }
+
+ public void expectAny()
+ {
+ expect();
+ }
+}
Modified: core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationQueueNotifier.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationQueueNotifier.java 2008-05-28 19:33:02 UTC (rev 5905)
+++ core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationQueueNotifier.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -1,6 +1,7 @@
package org.jboss.cache.util.internals;
import org.jboss.cache.Cache;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.cluster.ReplicationQueue;
import org.jboss.cache.factories.ComponentRegistry;
@@ -8,7 +9,6 @@
import org.jboss.cache.interceptors.InterceptorChain;
import org.jboss.cache.interceptors.base.CommandInterceptor;
import org.jboss.cache.invocation.CacheInvocationDelegate;
-import org.jboss.cache.misc.TestingUtil;
import java.util.List;
Copied: core/trunk/src/test/java/org/jboss/cache/util/internals/ViewChangeListener.java (from rev 5882, core/trunk/src/test/java/org/jboss/cache/misc/ViewChangeListener.java)
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/util/internals/ViewChangeListener.java (rev 0)
+++ core/trunk/src/test/java/org/jboss/cache/util/internals/ViewChangeListener.java 2008-05-29 07:24:18 UTC (rev 5906)
@@ -0,0 +1,55 @@
+package org.jboss.cache.util.internals;
+
+import org.jboss.cache.Cache;
+import org.jboss.cache.notifications.annotation.CacheListener;
+import org.jboss.cache.notifications.annotation.ViewChanged;
+import org.jboss.cache.notifications.event.ViewChangedEvent;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * A class that registers a cache listener with a given cache, and waits for a view change on the cache.
+ * <p/>
+ * Sample usage:
+ * <pre>
+ * Cache c = getCache();
+ * ViewChangeListener vcl = new ViewChangeListener(c);
+ * assert vcl.waitForViewChange(60, TimeUnit.SECONDS); // will block for up to 60 seconds for a view change on cache c
+ * </pre>
+ */
+@CacheListener
+public class ViewChangeListener
+{
+ CountDownLatch latch;
+
+ /**
+ * Constructs a view change listener
+ *
+ * @param cache cache to listen on for view change events
+ */
+ public ViewChangeListener(Cache cache)
+ {
+ this.latch = new CountDownLatch(1);
+ cache.addCacheListener(this);
+ }
+
+ @ViewChanged
+ public void handleViewChange(ViewChangedEvent e)
+ {
+ if (!e.isPre()) latch.countDown();
+ }
+
+ /**
+ * Waits for up to millis milliseconds for a view change to be received.
+ *
+ * @param timeout length of time to wait for a view change
+ * @param unit time unit to use
+ * @return true if a view change is received, false otherwise.
+ * @throws InterruptedException
+ */
+ public boolean waitForViewChange(long timeout, TimeUnit unit) throws InterruptedException
+ {
+ return latch.await(timeout, unit);
+ }
+}
\ No newline at end of file
16 years, 7 months
JBoss Cache SVN: r5905 - core/trunk/src/main/docbook/userguide/en/modules.
by jbosscache-commits@lists.jboss.org
Author: galder.zamarreno(a)jboss.com
Date: 2008-05-28 15:33:02 -0400 (Wed, 28 May 2008)
New Revision: 5905
Modified:
core/trunk/src/main/docbook/userguide/en/modules/deployment.xml
Log:
[JBCACHE-1344] Documentation updated accordingly.
Modified: core/trunk/src/main/docbook/userguide/en/modules/deployment.xml
===================================================================
--- core/trunk/src/main/docbook/userguide/en/modules/deployment.xml 2008-05-28 16:36:22 UTC (rev 5904)
+++ core/trunk/src/main/docbook/userguide/en/modules/deployment.xml 2008-05-28 19:33:02 UTC (rev 5905)
@@ -167,13 +167,20 @@
beans that make up a POJO service.
</para>
<para>
+ For each configurable option exposed by the
+ <literal>Configuration</literal>
+ components, a getter/setter must be defined in the configuration class.
+ This is required so that JBoss Microcontainer can, in typical IOC way,
+ call these methods when the corresponding properties have been
+ configured.
+ </para>
+ <para>
The rules for how to deploy the file, how to package it, how to
ensure the required jars are on the classpath, etc. are the same
as for a
<link linkend="deployment.microkernel">JMX-based deployment</link>
.
</para>
-
<para>
Following is an example
<literal>-beans.xml</literal>
16 years, 7 months
JBoss Cache SVN: r5904 - core/trunk.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-05-28 12:36:22 -0400 (Wed, 28 May 2008)
New Revision: 5904
Modified:
core/trunk/README-Maven.txt
Log:
Updated readme
Modified: core/trunk/README-Maven.txt
===================================================================
--- core/trunk/README-Maven.txt 2008-05-28 16:31:27 UTC (rev 5903)
+++ core/trunk/README-Maven.txt 2008-05-28 16:36:22 UTC (rev 5904)
@@ -35,7 +35,7 @@
username and password set up. (Deploys snapshots to http://snapshots.jboss.org/maven2/org/jboss/cache/). If you have
a non-SNAPSHOT version number in your pom.xml, it will be deployed to the live releases repository (see below)
-* mvn clean site -Ptest-functional,code-coverage: will run all tests in the test-functional profile and generate code
+* mvn clean site -Ptest-functional,codeCoverage: will run all tests in the test-functional profile and generate code
coverage reports using EMMA.
16 years, 7 months
JBoss Cache SVN: r5903 - core/trunk.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-05-28 12:31:27 -0400 (Wed, 28 May 2008)
New Revision: 5903
Modified:
core/trunk/pom.xml
Log:
Updated to use pom parent 1.3
Modified: core/trunk/pom.xml
===================================================================
--- core/trunk/pom.xml 2008-05-28 16:30:42 UTC (rev 5902)
+++ core/trunk/pom.xml 2008-05-28 16:31:27 UTC (rev 5903)
@@ -14,7 +14,7 @@
<parent>
<groupId>org.jboss.cache</groupId>
<artifactId>jbosscache-common-parent</artifactId>
- <version>1.3-SNAPSHOT</version>
+ <version>1.3</version>
</parent>
<groupId>org.jboss.cache</groupId>
<artifactId>jbosscache-core</artifactId>
16 years, 7 months
JBoss Cache SVN: r5902 - in support/tags/1.3: common and 1 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-05-28 12:30:42 -0400 (Wed, 28 May 2008)
New Revision: 5902
Modified:
support/tags/1.3/common/pom.xml
support/tags/1.3/pom.xml
support/tags/1.3/xslt/pom.xml
Log:
Modified: support/tags/1.3/common/pom.xml
===================================================================
--- support/tags/1.3/common/pom.xml 2008-05-28 16:29:25 UTC (rev 5901)
+++ support/tags/1.3/common/pom.xml 2008-05-28 16:30:42 UTC (rev 5902)
@@ -4,11 +4,11 @@
<parent>
<groupId>org.jboss.cache</groupId>
<artifactId>jbosscache-support</artifactId>
- <version>1.3-SNAPSHOT</version>
+ <version>1.3</version>
</parent>
<groupId>org.jboss.cache</groupId>
<artifactId>jbosscache-common-parent</artifactId>
- <version>1.3-SNAPSHOT</version>
+ <version>1.3</version>
<packaging>pom</packaging>
<name>JBoss Cache Common Parent</name>
<description>The parent POM for all JBoss Cache modules.</description>
Modified: support/tags/1.3/pom.xml
===================================================================
--- support/tags/1.3/pom.xml 2008-05-28 16:29:25 UTC (rev 5901)
+++ support/tags/1.3/pom.xml 2008-05-28 16:30:42 UTC (rev 5902)
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.cache</groupId>
<artifactId>jbosscache-support</artifactId>
- <version>1.3-SNAPSHOT</version>
+ <version>1.3</version>
<packaging>pom</packaging>
<name>JBoss Cache Support Modules</name>
<description>Grouping of JBoss Cache support modules</description>
Modified: support/tags/1.3/xslt/pom.xml
===================================================================
--- support/tags/1.3/xslt/pom.xml 2008-05-28 16:29:25 UTC (rev 5901)
+++ support/tags/1.3/xslt/pom.xml 2008-05-28 16:30:42 UTC (rev 5902)
@@ -6,12 +6,12 @@
<parent>
<groupId>org.jboss.cache</groupId>
<artifactId>jbosscache-support</artifactId>
- <version>1.3-SNAPSHOT</version>
+ <version>1.3</version>
</parent>
<groupId>org.jboss.cache</groupId>
<artifactId>jbosscache-doc-xslt-support</artifactId>
- <version>1.3-SNAPSHOT</version>
+ <version>1.3</version>
<name>JBoss Cache Documentation XSLT support</name>
<description>JBoss Cache Documentation XSLT support</description>
16 years, 7 months
JBoss Cache SVN: r5901 - support/tags.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-05-28 12:29:25 -0400 (Wed, 28 May 2008)
New Revision: 5901
Added:
support/tags/1.3/
Log:
Copied: support/tags/1.3 (from rev 5900, support/trunk)
16 years, 7 months