Author: manik.surtani(a)jboss.com
Date: 2007-11-12 10:38:10 -0500 (Mon, 12 Nov 2007)
New Revision: 4746
Modified:
core/trunk/src/test/java/org/jboss/cache/loader/ClusteredCacheLoaderTest.java
Log:
Added some logging
Modified: core/trunk/src/test/java/org/jboss/cache/loader/ClusteredCacheLoaderTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/loader/ClusteredCacheLoaderTest.java 2007-11-12
15:37:53 UTC (rev 4745)
+++
core/trunk/src/test/java/org/jboss/cache/loader/ClusteredCacheLoaderTest.java 2007-11-12
15:38:10 UTC (rev 4746)
@@ -13,6 +13,7 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.Region;
+import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.lock.TimeoutException;
import org.testng.annotations.AfterMethod;
@@ -244,7 +245,7 @@
cache2.put(fqn, "k", "v");
cache1.evict(fqn);
}
- final int loops = 10000;
+ final int loops = 1000;
final Set<Exception> exceptions = new
CopyOnWriteArraySet<Exception>();
Thread evictor = new Thread("Evictor")
@@ -256,8 +257,10 @@
latch.await();
for (int i = 0; i < loops; i++)
{
+ System.out.println("Evict in loop " + i);
Fqn f = singleFqn ? fqn : fqns.get(r.nextInt(fqns.size()));
cache1.evict(f);
+ TestingUtil.sleepRandom(50);
}
}
catch (TimeoutException te)
@@ -282,8 +285,10 @@
latch.await();
for (int i = 0; i < loops; i++)
{
+ System.out.println("Write in loop " + i);
Fqn f = singleFqn ? fqn : fqns.get(r.nextInt(fqns.size()));
cache2.put(f, "k", "v");
+ TestingUtil.sleepRandom(50);
}
}
catch (Exception e)
@@ -305,7 +310,9 @@
latch.await();
for (int i = 0; i < loops; i++)
{
+ System.out.println("R1 in loop " + i);
loader1.get(singleFqn ? fqn : fqns.get(r.nextInt(fqns.size())));
+ TestingUtil.sleepRandom(50);
}
}
catch (Exception e)
@@ -325,7 +332,9 @@
latch.await();
for (int i = 0; i < loops; i++)
{
+ System.out.println("R2 in loop " + i);
loader1.getChildrenNames(singleFqn ? fqn.getParent() :
fqns.get(r.nextInt(fqns.size())).getParent());
+ TestingUtil.sleepRandom(50);
}
}
catch (Exception e)
@@ -345,7 +354,9 @@
latch.await();
for (int i = 0; i < loops; i++)
{
+ System.out.println("R3 in loop " + i);
loader1.getChildrenNames(singleFqn ? fqn :
fqns.get(r.nextInt(fqns.size())));
+ TestingUtil.sleepRandom(50);
}
}
catch (Exception e)
Show replies by date