private final Fqn fqn = Fqn.fromString("/test");
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception
{
Configuration c = new Configuration();
c.setCacheMode(Configuration.CacheMode.REPL_SYNC);
c.setIsolationLevel(IsolationLevel.REPEATABLE_READ);
if (optLocking)
c.setNodeLockingScheme(Configuration.NodeLockingScheme.OPTIMISTIC);
else
c.setNodeLockingScheme(Configuration.NodeLockingScheme.PESSIMISTIC);
c.setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
// we need this because notifications emitted by the notification interceptor are done during the commit call.
// If we want to check notifications on remote nodes we need to make sure the commit completes before we test anything.
c.setSyncCommitPhase(true);
// more time to help with debugging
c.setSyncReplTimeout(60000);
UnitTestCacheFactory<String, String> instance = new UnitTestCacheFactory<String, String>();
cache1 = instance.createCache(c, getClass());
cache2 = instance.createCache(c.clone(), getClass());
eventLog1.events.clear();
eventLog2.events.clear();
cache1.addCacheListener(eventLog1);