Author: mircea.markus
Date: 2009-01-22 16:17:32 -0500 (Thu, 22 Jan 2009)
New Revision: 7573
Modified:
core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheLoaderTest.java
Log:
more strict concurrency control
Modified: core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheLoaderTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheLoaderTest.java 2009-01-22
21:02:49 UTC (rev 7572)
+++ core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheLoaderTest.java 2009-01-22
21:17:32 UTC (rev 7573)
@@ -29,7 +29,7 @@
* @author Bela Ban
* @version $Id$
*/
-@Test(groups = "functional", enabled = true, testName =
"loader.TcpCacheLoaderTest", sequential = true)
+@Test(groups = "functional", testName = "loader.TcpCacheLoaderTest")
public class TcpCacheLoaderTest extends CacheLoaderTestsBase
{
protected static final String TCP_CACHE_SERVER_HOST = "127.0.0.1";
@@ -282,7 +282,7 @@
int startAfter;
@NodeCreated
- public void restart(Event e)
+ public void restart(Event e) throws InterruptedException
{
if (e.isPre())
{
@@ -293,19 +293,16 @@
else if (delayedRestart)
{
stopCacheServer();
- new Thread()
- {
- public void run()
- {
- if (startAfter > 0)
- {
- TestingUtil.sleepThread(startAfter);
- startCacheServer();
- }
- }
- }.start();
}
}
+ else
+ {
+ if (delayedRestart && startAfter>0)
+ {
+ Thread.sleep(startAfter);
+ startCacheServer();
+ }
+ }
}
}
}
Show replies by date