Author: manik.surtani(a)jboss.com
Date: 2008-09-02 23:58:46 -0400 (Tue, 02 Sep 2008)
New Revision: 6683
Modified:
core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferConcurrencyTest.java
core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferTestBase.java
Log:
removed infinite wait
Modified:
core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferConcurrencyTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferConcurrencyTest.java 2008-09-03
03:38:06 UTC (rev 6682)
+++
core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferConcurrencyTest.java 2008-09-03
03:58:46 UTC (rev 6683)
@@ -487,12 +487,14 @@
// We expect a VISIT event for / and ADD events for /a, /a/b and /a/b/c
int nodeEventQueueSize = region.getEvictionEventQueue().size();
int i = 0;
- while (nodeEventQueueSize > 0)
+ int events = nodeEventQueueSize;
+ while (events > 0)
{
System.out.println(++i + ") Queue contains : " +
region.getEvictionEventQueue().poll(0, TimeUnit.MILLISECONDS));
+ events = region.getEvictionEventQueue().size();
}
- assertEquals("Saw the expected number of node events", 4,
nodeEventQueueSize);
+ assertEquals("Saw the expected number of node events", 5,
nodeEventQueueSize);
}
/**
Modified:
core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferTestBase.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferTestBase.java 2008-09-03
03:38:06 UTC (rev 6682)
+++
core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferTestBase.java 2008-09-03
03:58:46 UTC (rev 6683)
@@ -29,6 +29,7 @@
import org.jboss.cache.Region;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.Configuration.CacheMode;
+import org.jboss.cache.config.Configuration.NodeLockingScheme;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.loader.AbstractCacheLoaderTestBase;
import org.jboss.cache.loader.CacheLoader;
@@ -127,6 +128,7 @@
CacheMode mode = sync ? CacheMode.REPL_SYNC : CacheMode.REPL_ASYNC;
Configuration c = UnitTestCacheConfigurationFactory.createConfiguration(mode);
+ c.setNodeLockingScheme(NodeLockingScheme.PESSIMISTIC);
if (sync)
{