[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/misc ...
Manik Surtani
msurtani at jboss.com
Tue Sep 12 13:12:03 EDT 2006
User: msurtani
Date: 06/09/12 13:12:03
Modified: tests/functional/org/jboss/cache/misc TestingUtil.java
Log:
Updated test so it fails during state transfer
Revision Changes Path
1.9 +8 -0 JBossCache/tests/functional/org/jboss/cache/misc/TestingUtil.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TestingUtil.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/misc/TestingUtil.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- TestingUtil.java 29 Aug 2006 16:35:52 -0000 1.8
+++ TestingUtil.java 12 Sep 2006 17:12:03 -0000 1.9
@@ -12,6 +12,7 @@
import org.jboss.cache.TreeCache;
import java.util.List;
+import java.util.Random;
/**
* Utilities for unit testing JBossCache.
@@ -22,6 +23,8 @@
public class TestingUtil
{
+ private static Random random = new Random();
+
/**
* Loops, continually calling {@link #areCacheViewsComplete(CacheSPI[])}
* until it either returns true or <code>timeout</code> ms have elapsed.
@@ -264,4 +267,9 @@
{
}
}
+
+ public static void sleepRandom(int maxTime)
+ {
+ sleepThread(random.nextInt(maxTime));
+ }
}
More information about the jboss-cvs-commits
mailing list