You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2014/04/07 01:41:07 UTC

svn commit: r1585361 - /commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java

Author: sebb
Date: Sun Apr  6 23:41:06 2014
New Revision: 1585361

URL: http://svn.apache.org/r1585361
Log:
Show debug for invalid cache status

Modified:
    commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java

Modified: commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java?rev=1585361&r1=1585360&r2=1585361&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java (original)
+++ commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java Sun Apr  6 23:41:06 2014
@@ -90,10 +90,9 @@ public class BasicRemoteCacheClientServe
         cache.update( element );
         SleepUtil.sleepAtLeast( 200 );
 
-        assertEquals("Cache is alive", CacheStatus.ALIVE, cache.getStatus());
-
         // VERIFY
         try {
+            assertEquals("Cache is alive", CacheStatus.ALIVE, cache.getStatus());
             assertEquals( "Wrong number of puts", 1, server.getPutCount() - numPutsPrior );
         } catch (junit.framework.AssertionFailedError e) {
             System.out.println( cache.getStats() );
@@ -136,10 +135,9 @@ public class BasicRemoteCacheClientServe
         cache.update( element );
         SleepUtil.sleepAtLeast( 50 );
 
-        assertEquals("Cache is alive", CacheStatus.ALIVE, cache.getStatus());
-
         // VERIFY
         try {
+            assertEquals("Cache is alive", CacheStatus.ALIVE, cache.getStatus());
             assertEquals( "Wrong number of puts", 1, server.getPutCount() - numPutsPrior );
         } catch (junit.framework.AssertionFailedError e) {
             System.out.println( cache.getStats() );
@@ -190,11 +188,10 @@ public class BasicRemoteCacheClientServe
         cache.update( element );
         SleepUtil.sleepAtLeast( 50 );
 
-        assertEquals("Cache is alive", CacheStatus.ALIVE, cache.getStatus());
-
         // VERIFY
         try
         {
+            assertEquals("Cache is alive", CacheStatus.ALIVE, cache.getStatus());
             assertEquals( "Wrong number of puts", 1, server.getPutCount() - numPutsPrior );
             assertEquals( "Wrong number of puts to listener.", 1, listener.putCount );
         } catch (junit.framework.AssertionFailedError e) {
@@ -241,10 +238,9 @@ public class BasicRemoteCacheClientServe
         }
         SleepUtil.sleepAtLeast( 500 );
 
-        assertEquals("Cache is alive", CacheStatus.ALIVE, cache.getStatus());
-
         // VERIFY
         try {
+            assertEquals("Cache is alive", CacheStatus.ALIVE, cache.getStatus());
             assertEquals( "Wrong number of puts", numToPut, server.getPutCount() - numPutsPrior );
             assertEquals( "Wrong number of puts to listener.", numToPut, listener.putCount );
         } catch (junit.framework.AssertionFailedError e) {