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/02 17:22:57 UTC

svn commit: r1584070 - in /commons/proper/jcs/trunk/src: experimental/org/apache/commons/jcs/auxiliary/lateral/http/remove/ experimental/org/apache/commons/jcs/engine/memory/arc/ java/org/apache/commons/jcs/auxiliary/remote/server/ test/org/apache/comm...

Author: sebb
Date: Wed Apr  2 15:22:56 2014
New Revision: 1584070

URL: http://svn.apache.org/r1584070
Log:
Flag or fix some more test noise

Modified:
    commons/proper/jcs/trunk/src/experimental/org/apache/commons/jcs/auxiliary/lateral/http/remove/DeleteLateralCacheUnicaster.java
    commons/proper/jcs/trunk/src/experimental/org/apache/commons/jcs/engine/memory/arc/ARCMemoryCacheUnitTest.java
    commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServerFactory.java
    commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/admin/AdminBeanUnitTest.java
    commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/http/client/RemoteHttpCacheManualTester.java
    commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/utils/struct/LRUMapConcurrentUnitTest.java

Modified: commons/proper/jcs/trunk/src/experimental/org/apache/commons/jcs/auxiliary/lateral/http/remove/DeleteLateralCacheUnicaster.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/experimental/org/apache/commons/jcs/auxiliary/lateral/http/remove/DeleteLateralCacheUnicaster.java?rev=1584070&r1=1584069&r2=1584070&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/experimental/org/apache/commons/jcs/auxiliary/lateral/http/remove/DeleteLateralCacheUnicaster.java (original)
+++ commons/proper/jcs/trunk/src/experimental/org/apache/commons/jcs/auxiliary/lateral/http/remove/DeleteLateralCacheUnicaster.java Wed Apr  2 15:22:56 2014
@@ -135,7 +135,6 @@ public class DeleteLateralCacheUnicaster
             }
             out.close();
             in.close();
-            // System.out.println("closed inputstream" );
         }
         catch ( Exception e )
         {

Modified: commons/proper/jcs/trunk/src/experimental/org/apache/commons/jcs/engine/memory/arc/ARCMemoryCacheUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/experimental/org/apache/commons/jcs/engine/memory/arc/ARCMemoryCacheUnitTest.java?rev=1584070&r1=1584069&r2=1584070&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/experimental/org/apache/commons/jcs/engine/memory/arc/ARCMemoryCacheUnitTest.java (original)
+++ commons/proper/jcs/trunk/src/experimental/org/apache/commons/jcs/engine/memory/arc/ARCMemoryCacheUnitTest.java Wed Apr  2 15:22:56 2014
@@ -76,7 +76,7 @@ public class ARCMemoryCacheUnitTest
             assertEquals( "myregion" + " data " + i, value );
         }
 
-        System.out.println( cache.getStats() );
+        System.out.println( cache.getStats() ); // TODO replace noise with an assertion
     }
 
     /**
@@ -105,7 +105,7 @@ public class ARCMemoryCacheUnitTest
             arc.update( ice );
         }
 
-        System.out.println( "testGetKeyArray " + arc.getStats() );
+        System.out.println( "testGetKeyArray " + arc.getStats() ); // TODO replace noise with an assertion
 
         Object[] keys = arc.getKeyArray();
         assertEquals( "Wrong number of keys.", items, keys.length );
@@ -139,7 +139,7 @@ public class ARCMemoryCacheUnitTest
 
         ICacheElement<K, V> element = arc.get( 0 + ":key" );
 
-        System.out.println( "testHitInT1BelowMax " + arc.getStats() );
+        System.out.println( "testHitInT1BelowMax " + arc.getStats() ); // TODO replace noise with an assertion
 
         assertNotNull( "Should have the element.", element );
         assertEquals( "Target t1 should be 1/2 until dupe gets or puts.", max / 2, arc.getTarget_T1() );
@@ -174,7 +174,7 @@ public class ARCMemoryCacheUnitTest
 
         ICacheElement<K, V> element = arc.get( 0 + ":key" );
 
-        System.out.println( "testHitInT1ThenT2BelowMax " + arc.getStats() );
+        System.out.println( "testHitInT1ThenT2BelowMax " + arc.getStats() ); // TODO replace noise with an assertion
 
         assertNotNull( "Should have the element.", element );
         assertEquals( "Target t1 should be 1/2 until dupe gets or puts.", max / 2, arc.getTarget_T1() );
@@ -209,7 +209,7 @@ public class ARCMemoryCacheUnitTest
 
         ICacheElement<K, V> element = arc.get( 0 + ":key" );
 
-        System.out.println( "testHitInT1AtMax " + arc.getStats() );
+        System.out.println( "testHitInT1AtMax " + arc.getStats() ); // TODO replace noise with an assertion
 
         assertNotNull( "Should have the element.", element );
         assertEquals( "Target t1 should be 1/2 until dupe gets or puts.", max / 2, arc.getTarget_T1() );
@@ -244,7 +244,7 @@ public class ARCMemoryCacheUnitTest
 
         ICacheElement<K, V> element = arc.get( 0 + ":key" );
 
-        System.out.println( "testHitInT1OverMax " + arc.getStats() );
+        System.out.println( "testHitInT1OverMax " + arc.getStats() ); // TODO replace noise with an assertion
 
         assertNull( "Should not have the element since it was the first.", element );
         assertEquals( "Target t1 should be 1/2 until dupe gets or puts.", max / 2, arc.getTarget_T1() );
@@ -279,7 +279,7 @@ public class ARCMemoryCacheUnitTest
 
         //ICacheElement<K, V> element = arc.get( 0 + ":key" );
 
-        System.out.println( "testPutInT1ToMax " + arc.getStats() );
+        System.out.println( "testPutInT1ToMax " + arc.getStats() ); // TODO replace noise with an assertion
 
         //assertNotNull( "Should have the element.", element );
         assertEquals( "Target t1 should be 1/2 until dupe gets or puts.", max / 2, arc.getTarget_T1() );

Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServerFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServerFactory.java?rev=1584070&r1=1584069&r2=1584070&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServerFactory.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServerFactory.java Wed Apr  2 15:22:56 2014
@@ -505,7 +505,7 @@ public class RemoteCacheServerFactory
 
                 try
                 {
-                    System.out.println( admin.getStats().toString() );
+//                    System.out.println( admin.getStats().toString() );
                     log.debug( admin.getStats() );
                 }
                 catch ( Exception es )

Modified: commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/admin/AdminBeanUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/admin/AdminBeanUnitTest.java?rev=1584070&r1=1584069&r2=1584070&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/admin/AdminBeanUnitTest.java (original)
+++ commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/admin/AdminBeanUnitTest.java Wed Apr  2 15:22:56 2014
@@ -56,7 +56,7 @@ public class AdminBeanUnitTest
 
         for (CacheRegionInfo info : regions)
         {
-            System.out.println( info );
+            System.out.println( info ); // TODO replace noise with an assertion
 
             if ( info.getCacheName().equals( regionName ) )
             {
@@ -95,8 +95,7 @@ public class AdminBeanUnitTest
         assertEquals( "Wrong number of elements in the region.", 1, elements.length );
 
         CacheElementInfo elementInfo = elements[0];
-        System.out.println( elementInfo );
-        assertEquals( "Wrong key.", key, elementInfo.getKey() );
+        assertEquals( "Wrong key." + elementInfo, key, elementInfo.getKey() );
     }
 
     /**

Modified: commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/http/client/RemoteHttpCacheManualTester.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/http/client/RemoteHttpCacheManualTester.java?rev=1584070&r1=1584069&r2=1584070&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/http/client/RemoteHttpCacheManualTester.java (original)
+++ commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/http/client/RemoteHttpCacheManualTester.java Wed Apr  2 15:22:56 2014
@@ -51,7 +51,7 @@ public class RemoteHttpCacheManualTester
 
         jcs.put( "TestKey", "TestValue" );
 
-        System.out.println( jcs.getStats() );
+        System.out.println( jcs.getStats() ); // TODO replace noise with an assertion
 
         for ( int i = 1; i <= items; i++ )
         {
@@ -71,6 +71,6 @@ public class RemoteHttpCacheManualTester
         jcs.remove( "300:key" );
         assertNull( jcs.get( "TestKey" ) );
 
-        System.out.println( jcs.getStats() );
+        System.out.println( jcs.getStats() ); // TODO replace noise with an assertion
     }
 }

Modified: commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/utils/struct/LRUMapConcurrentUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/utils/struct/LRUMapConcurrentUnitTest.java?rev=1584070&r1=1584069&r2=1584070&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/utils/struct/LRUMapConcurrentUnitTest.java (original)
+++ commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/utils/struct/LRUMapConcurrentUnitTest.java Wed Apr  2 15:22:56 2014
@@ -161,9 +161,9 @@ public class LRUMapConcurrentUnitTest
         Iterator<?> it = map.entrySet().iterator();
         while ( it.hasNext() )
         {
-            System.out.println( it.next() );
+            System.out.println( it.next() ); // TODO replace noise with an assertion
         }
-        System.out.println( map.getStatistics() );
+        System.out.println( map.getStatistics() ); // TODO replace noise with an assertion
 
         // get the max out backwards
         for ( int i = total - 1; i >= 0; i-- )
@@ -172,7 +172,7 @@ public class LRUMapConcurrentUnitTest
             assertNotNull( "[" + i + ":key] should not be null", res );
         }
 
-        System.out.println( map.getStatistics() );
+        System.out.println( map.getStatistics() ); // TODO replace noise with an assertion
 
         //since we got them backwards the total should be at the end.
         // add one confirm that total is gone.
@@ -211,7 +211,7 @@ public class LRUMapConcurrentUnitTest
             assertNotNull( "[" + i + ":key] should not be null", res );
         }
 
-        System.out.println( map.getStatistics() );
+        System.out.println( map.getStatistics() ); // TODO replace noise with an assertion
 
     }