package org.jboss.cache.invalidation;
import org.jboss.cache.TreeCache;
import org.jboss.cache.misc.TestingUtil;
/**
* Tests the edge cases defined in JBCACHE-806
*
* @author <a href="mailto:manik@jboss.org">Manik Surtani</a>
* @since 1.4.0
*/
public class OptimisticAsyncInvalidationTest extends OptimisticSyncInvalidationTest
{
protected TreeCache createCache() throws Exception
{
TreeCache c = new TreeCache();
c.setCacheMode(TreeCache.INVALIDATION_ASYNC); // only use sync.
c.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
c.setNodeLockingScheme("OPTIMISTIC");
c.startService();
return c;
}
protected void pause()
{
TestingUtil.sleepThread(500);
}
public void testIncorrectInsertion()
{
// do nothing; in async mode we cannot guarantee than an invalidation is correct or contains stale data.
}
}