[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/api/pfer ...
Manik Surtani
manik at jboss.org
Wed Jun 6 08:43:48 EDT 2007
User: msurtani
Date: 07/06/06 08:43:48
Modified: tests/functional/org/jboss/cache/api/pfer
PutForExternalReadTestBase.java
Log:
Removed a lot of deprecation
Revision Changes Path
1.4 +6 -8 JBossCache/tests/functional/org/jboss/cache/api/pfer/PutForExternalReadTestBase.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: PutForExternalReadTestBase.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/api/pfer/PutForExternalReadTestBase.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- PutForExternalReadTestBase.java 16 Apr 2007 17:37:13 -0000 1.3
+++ PutForExternalReadTestBase.java 6 Jun 2007 12:43:48 -0000 1.4
@@ -1,7 +1,6 @@
package org.jboss.cache.api.pfer;
import org.jboss.cache.Cache;
-import org.jboss.cache.CacheImpl;
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
@@ -42,14 +41,14 @@
protected void setUp()
{
- cache1 = (Cache) DefaultCacheFactory.getInstance().createCache(UnitTestCacheConfigurationFactory.createConfiguration(cacheMode),false);
+ cache1 = (Cache) DefaultCacheFactory.getInstance().createCache(UnitTestCacheConfigurationFactory.createConfiguration(cacheMode), false);
cache1.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
cache1.getConfiguration().setNodeLockingScheme(optimistic ? Configuration.NodeLockingScheme.OPTIMISTIC : Configuration.NodeLockingScheme.PESSIMISTIC);
cache1.start();
tm1 = cache1.getConfiguration().getRuntimeConfig().getTransactionManager();
- cache2 = (Cache) DefaultCacheFactory.getInstance().createCache(UnitTestCacheConfigurationFactory.createConfiguration(cacheMode),false);
+ cache2 = (Cache) DefaultCacheFactory.getInstance().createCache(UnitTestCacheConfigurationFactory.createConfiguration(cacheMode), false);
cache2.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
cache2.getConfiguration().setNodeLockingScheme(optimistic ? Configuration.NodeLockingScheme.OPTIMISTIC : Configuration.NodeLockingScheme.PESSIMISTIC);
@@ -173,11 +172,10 @@
public void testAsyncForce()
{
Mock mockRpcManager = mock(RPCManager.class);
- CacheImpl cache1Impl = (CacheImpl) cache1;
- RPCManager originalRpcManager = cache1Impl.getRPCManager();
+ RPCManager originalRpcManager = cache1.getConfiguration().getRuntimeConfig().getRPCManager();
// inject a mock RPC manager so that we can test whether calls made are sync or async.
- cache1Impl.setRpcManager((RPCManager) mockRpcManager.proxy());
+ cache1.getConfiguration().getRuntimeConfig().setRPCManager((RPCManager) mockRpcManager.proxy());
// specify what we expect called on the mock Rpc Manager. For params we don't care about, just use ANYTHING.
// setting the mock object to expect the "sync" param to be false.
@@ -187,7 +185,7 @@
cache1.putForExternalRead(fqn, key, value);
// cleanup
- cache1Impl.setRpcManager(originalRpcManager);
+ cache1.getConfiguration().getRuntimeConfig().setRPCManager(originalRpcManager);
cache1.removeNode(fqn);
}
@@ -236,7 +234,7 @@
};
barfingRpcManager.setCache((CacheSPI) cache1);
- ((CacheImpl) cache1).setRpcManager(barfingRpcManager);
+ cache1.getConfiguration().getRuntimeConfig().setRPCManager(barfingRpcManager);
try
{
More information about the jboss-cvs-commits
mailing list