[jbosscache-commits] JBoss Cache SVN: r5637 - core/trunk/src/test/java/org/jboss/cache/options.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Wed Apr 23 06:15:08 EDT 2008


Author: manik.surtani at jboss.com
Date: 2008-04-23 06:15:07 -0400 (Wed, 23 Apr 2008)
New Revision: 5637

Modified:
   core/trunk/src/test/java/org/jboss/cache/options/ForceCacheModeTest.java
Log:
Updated assertion msgs

Modified: core/trunk/src/test/java/org/jboss/cache/options/ForceCacheModeTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/options/ForceCacheModeTest.java	2008-04-23 09:29:39 UTC (rev 5636)
+++ core/trunk/src/test/java/org/jboss/cache/options/ForceCacheModeTest.java	2008-04-23 10:15:07 UTC (rev 5637)
@@ -309,8 +309,8 @@
       updater.start();
 
       updater.join(250);
-      assertTrue("Updater finished", updater.finished);
-      assertNull("Updater succeeded", updater.failure);
+      assertTrue("Updater didn't finish", updater.finished);
+      assertNull("Updater failed", updater.failure);
 
       for (int i = 0; i < 50; i++)
       {
@@ -319,8 +319,8 @@
          TestingUtil.sleepThread(10);
       }
 
-      assertTrue("Listener blocked", listener.blocked);
-      assertEquals("Cache1 correct", removeTest ? null : VALUE2, cache1.get(FQNA, KEY));
+      assertTrue("Listener should have blocked!", listener.blocked);
+      assertEquals("Cache1 state incorrect!", removeTest ? null : VALUE2, cache1.get(FQNA, KEY));
 
       latch.countDown();
 
@@ -335,7 +335,7 @@
       TestingUtil.sleepThread(5);
       CacheMode mode = cache2.getConfiguration().getCacheMode();
       boolean expectNull = (removeTest || mode == CacheMode.INVALIDATION_ASYNC || mode == CacheMode.INVALIDATION_SYNC);
-      assertEquals("Cache2 correct", expectNull ? null : VALUE2, cache2.get(FQNA, KEY));
+      assertEquals("Cache2 state incorrect!", expectNull ? null : VALUE2, cache2.get(FQNA, KEY));
    }
 
    /**
@@ -355,7 +355,7 @@
       updater.start();
 
       updater.join(250);
-      assertFalse("Updater blocked", updater.finished);
+      assertFalse("Updater should have blocked!", updater.finished);
 
       for (int i = 0; i < 50; i++)
       {
@@ -364,7 +364,7 @@
          TestingUtil.sleepThread(10);
       }
 
-      assertTrue("Listener blocked", listener.blocked);
+      assertTrue("Listener should have blocked", listener.blocked);
 
       latch.countDown();
 
@@ -375,18 +375,18 @@
          TestingUtil.sleepThread(10);
       }
 
-      assertTrue("Updater finished", updater.finished);
-      assertFalse("Listener blocked", listener.blocked);
-      assertNull("Updater succeeded", updater.failure);
+      assertTrue("Updater should have finished", updater.finished);
+      assertFalse("Listener should have blocked", listener.blocked);
+      assertNull("Updater should have succeeded", updater.failure);
 
-      assertEquals("Cache1 correct", removeTest ? null : VALUE2, cache1.get(FQNA, KEY));
+      assertEquals("Cache1 state incorrect", removeTest ? null : VALUE2, cache1.get(FQNA, KEY));
 
       // sleep a bit more to ensure the cache2 thread completes
       TestingUtil.sleepThread(500);
 
       CacheMode mode = cache2.getConfiguration().getCacheMode();
       boolean expectNull = (removeTest || mode == CacheMode.INVALIDATION_ASYNC || mode == CacheMode.INVALIDATION_SYNC);
-      assertEquals("Cache2 correct", expectNull ? null : VALUE2, cache2.get(FQNA, KEY));
+      assertEquals("Cache2 state incorrect", expectNull ? null : VALUE2, cache2.get(FQNA, KEY));
    }
 
    class Updater extends Thread
@@ -459,7 +459,7 @@
       @NodeEvicted
       public void block(NodeEvent event)
       {
-         log.warn("Received event notification " + event);
+         log.error("Received event notification " + event);
          if (event.isPre() == false && FQNA.equals(event.getFqn()))
          {
             blocked = true;




More information about the jbosscache-commits mailing list