[jbosscache-commits] JBoss Cache SVN: r6587 - core/trunk/src/test/java/org/jboss/cache/eviction.
jbosscache-commits at lists.jboss.org
jbosscache-commits at lists.jboss.org
Thu Aug 21 09:16:49 EDT 2008
Author: mircea.markus
Date: 2008-08-21 09:16:49 -0400 (Thu, 21 Aug 2008)
New Revision: 6587
Modified:
core/trunk/src/test/java/org/jboss/cache/eviction/ExpirationPolicyTest.java
Log:
fixed test
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/ExpirationPolicyTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/ExpirationPolicyTest.java 2008-08-21 13:10:15 UTC (rev 6586)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/ExpirationPolicyTest.java 2008-08-21 13:16:49 UTC (rev 6587)
@@ -66,6 +66,20 @@
cache.stop();
}
+ public void testUpdateToFuture() throws Exception
+ {
+ log.info("update 1 from future to past");
+ cache.put(fqn1, ExpirationAlgorithmConfig.EXPIRATION_KEY, future);
+ TestingUtil.sleepThread(200);
+ assertNotNull(cache.getNode(fqn1));
+ cache.put(fqn1, ExpirationAlgorithmConfig.EXPIRATION_KEY, future + 250);
+ TestingUtil.sleepThread(500);
+ assertNotNull(cache.getNode(fqn1));
+ TestingUtil.sleepThread(100);
+ assertNull(cache.getNode(fqn1));
+ cache.removeNode(Fqn.ROOT);
+ }
+
public void testEviction() throws Exception
{
cache.put(fqn1, ExpirationAlgorithmConfig.EXPIRATION_KEY, future);
@@ -95,21 +109,6 @@
cache.removeNode(Fqn.ROOT);
}
- public void testUpdateToFuture() throws Exception
- {
- log.info("update 1 from future to past");
- Long future2 = future + 200;
- cache.put(fqn1, ExpirationAlgorithmConfig.EXPIRATION_KEY, future);
- TestingUtil.sleepThread(200);
- assertNotNull(cache.getNode(fqn1));
- cache.put(fqn1, ExpirationAlgorithmConfig.EXPIRATION_KEY, future2);
- TestingUtil.sleepThread(500);
- assertNotNull(cache.getNode(fqn1));
- TestingUtil.sleepThread(100);
- assertNull(cache.getNode(fqn1));
- cache.removeNode(Fqn.ROOT);
- }
-
public void testMaxNodes() throws Exception
{
log.info("set max nodes to 2, expire soonest to expire first");
More information about the jbosscache-commits
mailing list