[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/statetransfer ...
Vladmir Blagojevic
vladimir.blagojevic at jboss.com
Mon Jul 30 10:54:16 EDT 2007
User: vblagojevic
Date: 07/07/30 10:54:16
Modified: tests/functional/org/jboss/cache/statetransfer
StateTransferConcurrencyTest.java
Log:
revert test back to concurrent activation
Revision Changes Path
1.3 +11 -20 JBossCache/tests/functional/org/jboss/cache/statetransfer/StateTransferConcurrencyTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: StateTransferConcurrencyTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/statetransfer/StateTransferConcurrencyTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- StateTransferConcurrencyTest.java 23 Jul 2007 00:34:52 -0000 1.2
+++ StateTransferConcurrencyTest.java 30 Jul 2007 14:54:16 -0000 1.3
@@ -32,7 +32,7 @@
* TODO add tests with classloader regions
*
* @author <a href="mailto://brian.stansberry@jboss.com">Brian Stansberry</a>
- * @version $Id: StateTransferConcurrencyTest.java,v 1.2 2007/07/23 00:34:52 vblagojevic Exp $
+ * @version $Id: StateTransferConcurrencyTest.java,v 1.3 2007/07/30 14:54:16 vblagojevic Exp $
*/
public class StateTransferConcurrencyTest extends StateTransferTestBase
{
@@ -124,7 +124,7 @@
// Sleep to allow any async calls to clear
if (!sync)
{
- TestingUtil.sleepThread(1000);
+ TestingUtil.sleepThread(2000);
}
// Ensure the caches held by the activators see all the values
@@ -391,27 +391,18 @@
// and to ensure puts are actively in progress
TestingUtil.sleepThread((long) 1000);
- //Stop the stressor so we don't pollute cacheA's state
- // with too many messages sent after activation -- we want
- // to compare transferred state with the sender
-
- for(CacheStressor stressor:stressors){
- stressor.stopPuts();
- }
-
- TestingUtil.sleepThread((long) 1000);
-
// Activate cacheA
- for (int i = 0; i < count; i++)
+ for (CacheStressor stressor:stressors)
{
- System.out.println("Activating /" + names[i] + " on A");
- cacheA.getRegion(Fqn.fromString("/" + names[i]), true).activate();
- System.out.println("Run " + x + "-- /" + names[i] + " activated on A");
+ System.out.println("Activating /" + stressor.getName() + " on A");
+ cacheA.getRegion(Fqn.fromString("/" + stressor.getName()), true).activate();
+ stressor.stopPuts();
+ System.out.println("Run " + x + "-- /" + stressor.getName() + " activated on A");
// Reacquire one semaphore ticket
boolean acquired = semaphore.tryAcquire(60, TimeUnit.SECONDS);
if (!acquired)
{
- fail("failed to acquire semaphore " + i);
+ fail("failed to acquire semaphore " + stressor.getName());
}
// Pause to allow other work to proceed
@@ -665,8 +656,8 @@
{
TestingUtil.sleepRandom(5000);
createAndActivateRegion(cache, A_B);
- // System.out.println(name + " activated region" + " " + System.currentTimeMillis());
- Fqn childFqn = Fqn.fromString("/a/b/" + name);
+ System.out.println(name + " activated region" + " " + System.currentTimeMillis());
+ Fqn childFqn = new Fqn(A_B,name);
cache.put(childFqn, "KEY", "VALUE");
// System.out.println(name + " put fqn " + childFqn + " " + System.currentTimeMillis());
More information about the jboss-cvs-commits
mailing list