commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1583955 - in /commons/proper/jcs/trunk/src: test-conf/ test/org/apache/commons/jcs/ test/org/apache/commons/jcs/auxiliary/disk/block/ test/org/apache/commons/jcs/auxiliary/disk/indexed/ test/org/apache/commons/jcs/auxiliary/lateral/socket/...
Date Wed, 02 Apr 2014 10:35:27 GMT
Author: tv
Date: Wed Apr  2 10:35:27 2014
New Revision: 1583955

URL: http://svn.apache.org/r1583955
Log:
Made tests less chatty

Modified:
    commons/proper/jcs/trunk/src/test-conf/log4j.properties
    commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/JCSConcurrentCacheAccessUnitTest.java
    commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskCacheUnitTest.java
    commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskUnitTest.java
    commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/disk/indexed/IndexDiskCacheUnitTest.java
    commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPIssueRemoveOnPutUnitTest.java
    commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServerFactoryUnitTest.java
    commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/utils/struct/SortedPrefArrayUnitTest.java

Modified: commons/proper/jcs/trunk/src/test-conf/log4j.properties
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test-conf/log4j.properties?rev=1583955&r1=1583954&r2=1583955&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test-conf/log4j.properties (original)
+++ commons/proper/jcs/trunk/src/test-conf/log4j.properties Wed Apr  2 10:35:27 2014
@@ -14,7 +14,8 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-log4j.rootCategory=INFO, stdout
+#log4j.rootCategory=INFO, stdout
+log4j.rootCategory=INFO, logfile
 
 log4j.category.org.apache.commons.jcs=INFO
 log4j.category.org.apache.commons.jcs.config=INFO
@@ -34,12 +35,9 @@ log4j.appender.stdout=org.apache.log4j.C
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%d %p [%c{1}] - <%m>%n
 
-log4j.appender.logfile=org.apache.log4j.RollingFileAppender
+log4j.appender.logfile=org.apache.log4j.FileAppender
 log4j.appender.logfile.File=target/jcs.log
-log4j.appender.logfile.MaxFileSize=5MB
 log4j.appender.logfile.Append=false
-# Keep three backup files
-log4j.appender.logfile.MaxBackupIndex=3
 log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
 # Pattern to output : date priority [category] - <message>line_separator
 log4j.appender.logfile.layout.ConversionPattern=%d %p [%c{1}] - <%m>%n

Modified: commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/JCSConcurrentCacheAccessUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/JCSConcurrentCacheAccessUnitTest.java?rev=1583955&r1=1583954&r2=1583955&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/JCSConcurrentCacheAccessUnitTest.java
(original)
+++ commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/JCSConcurrentCacheAccessUnitTest.java
Wed Apr  2 10:35:27 2014
@@ -130,10 +130,10 @@ public class JCSConcurrentCacheAccessUni
 		        	// continue
 				}
 
-		        if ((idx % 1000) == 0)
-		        {
-		        	System.out.println(name + " " + idx);
-		        }
+//		        if ((idx % 1000) == 0)
+//		        {
+//		        	System.out.println(name + " " + idx);
+//		        }
 			}
 
 		}

Modified: commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskCacheUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskCacheUnitTest.java?rev=1583955&r1=1583954&r2=1583955&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskCacheUnitTest.java
(original)
+++ commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskCacheUnitTest.java
Wed Apr  2 10:35:27 2014
@@ -143,7 +143,7 @@ public class BlockDiskCacheUnitTest
         }
 
         Serializable result = elementSerializer.deSerialize( resultData );
-        System.out.println( result );
+        // System.out.println( result );
         assertEquals( "wrong string after retrieval", string, result );
     }
 
@@ -181,7 +181,7 @@ public class BlockDiskCacheUnitTest
         Thread.sleep( 1000 );
         ICacheElement<String, String> afterElement = diskCache.get( "x" );
         assertNotNull( afterElement );
-        System.out.println( "afterElement = " + afterElement );
+        // System.out.println( "afterElement = " + afterElement );
         String after = afterElement.getVal();
 
         assertNotNull( after );
@@ -224,7 +224,7 @@ public class BlockDiskCacheUnitTest
         Thread.sleep( 1000 );
         ICacheElement<String, String> afterElement = diskCache.get( "x" );
         assertNotNull( afterElement );
-        System.out.println( "afterElement = " + afterElement );
+        // System.out.println( "afterElement = " + afterElement );
         String after = afterElement.getVal();
 
         assertNotNull( after );
@@ -316,7 +316,7 @@ public class BlockDiskCacheUnitTest
         assertNotNull( diskCache.get( "x" ) );
         Thread.sleep( 1000 );
         ICacheElement<String, X> afterElement = diskCache.get( "x" );
-        System.out.println( "afterElement = " + afterElement );
+        // System.out.println( "afterElement = " + afterElement );
         X after = ( afterElement.getVal() );
 
         assertNotNull( after );

Modified: commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskUnitTest.java?rev=1583955&r1=1583954&r2=1583955&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskUnitTest.java
(original)
+++ commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskUnitTest.java
Wed Apr  2 10:35:27 2014
@@ -335,9 +335,9 @@ public class BlockDiskUnitTest
         String result = (String) disk.read( blocks );
 
         // VERIFY
-        System.out.println( string );
-        System.out.println( result );
-        System.out.println( disk );
+//        System.out.println( string );
+//        System.out.println( result );
+//        System.out.println( disk );
         assertEquals( "Wrong item retured.", string, result );
     }
 

Modified: commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/disk/indexed/IndexDiskCacheUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/disk/indexed/IndexDiskCacheUnitTest.java?rev=1583955&r1=1583954&r2=1583955&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/disk/indexed/IndexDiskCacheUnitTest.java
(original)
+++ commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/disk/indexed/IndexDiskCacheUnitTest.java
Wed Apr  2 10:35:27 2014
@@ -818,7 +818,7 @@ public class IndexDiskCacheUnitTest
         Thread.sleep( 1000 );
         ICacheElement<String, String> afterElement = diskCache.get( "x" );
         assertNotNull( afterElement );
-        System.out.println( "afterElement = " + afterElement );
+        // System.out.println( "afterElement = " + afterElement );
         String after = afterElement.getVal();
 
         assertNotNull( after );
@@ -861,7 +861,7 @@ public class IndexDiskCacheUnitTest
         Thread.sleep( 1000 );
         ICacheElement<String, byte[]> afterElement = diskCache.get( "x" );
         assertNotNull( afterElement );
-        System.out.println( "afterElement = " + afterElement );
+        // System.out.println( "afterElement = " + afterElement );
         byte[] after = afterElement.getVal();
 
         assertNotNull( after );

Modified: commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPIssueRemoveOnPutUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPIssueRemoveOnPutUnitTest.java?rev=1583955&r1=1583954&r2=1583955&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPIssueRemoveOnPutUnitTest.java
(original)
+++ commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPIssueRemoveOnPutUnitTest.java
Wed Apr  2 10:35:27 2014
@@ -127,7 +127,7 @@ public class LateralTCPIssueRemoveOnPutU
         throws Exception
     {
 
-        boolean show = true;// false;
+        boolean show = false;
 
         CacheAccess<String, String> cache = JCS.getInstance( region );
 

Modified: commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServerFactoryUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServerFactoryUnitTest.java?rev=1583955&r1=1583954&r2=1583955&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServerFactoryUnitTest.java
(original)
+++ commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServerFactoryUnitTest.java
Wed Apr  2 10:35:27 2014
@@ -31,21 +31,6 @@ public class RemoteCacheServerFactoryUni
     extends TestCase
 {
     /** verify that we get the timeout value */
-    public void testConfigureRemoteCacheServerAttributes_eventQueueType()
-    {
-        // SETUP
-        String eventQueueType = "my.special.type";
-        Properties props = new Properties();
-        props.put( IRemoteCacheConstants.CACHE_SERVER_ATTRIBUTES_PROPERTY_PREFIX + ".EventQueueType",
eventQueueType );
-
-        // DO WORK
-        RemoteCacheServerAttributes result = RemoteCacheServerFactory.configureRemoteCacheServerAttributes(
props );
-
-        // VERIFY
-        assertEquals( "Wrong EventQueueType", eventQueueType, result.getEventQueueType()
);
-    }
-
-    /** verify that we get the timeout value */
     public void testConfigureRemoteCacheServerAttributes_eventQueuePoolName()
     {
         // SETUP

Modified: commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/utils/struct/SortedPrefArrayUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/utils/struct/SortedPrefArrayUnitTest.java?rev=1583955&r1=1583954&r2=1583955&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/utils/struct/SortedPrefArrayUnitTest.java
(original)
+++ commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/utils/struct/SortedPrefArrayUnitTest.java
Wed Apr  2 10:35:27 2014
@@ -39,16 +39,6 @@ public class SortedPrefArrayUnitTest
     }
 
     /**
-     * Description of the Method
-     * @param args Description of the Parameter
-     */
-    public static void main( String args[] )
-    {
-        String[] testCaseName = { SortedPrefArrayUnitTest.class.getName() };
-        junit.textui.TestRunner.main( testCaseName );
-    }
-
-    /**
      * @throws Exception
      */
     public void testLargePref()
@@ -98,7 +88,7 @@ public class SortedPrefArrayUnitTest
         for ( int i = 0; i < elem.length; i++ )
         {
             array.add( elem[i] );
-            System.out.println( array.dumpArray() );
+            // System.out.println( array.dumpArray() );
         }
 
         assertEquals( "Size was not as expected.", maxSize, array.size() );
@@ -115,7 +105,7 @@ public class SortedPrefArrayUnitTest
         assertEquals( "Taken should be 96", "96", taken );
         assertEquals( "Size was not as expected.", ( maxSize - 1 ), array.size() );
 
-        System.out.println( array.dumpArray() );
+        // System.out.println( array.dumpArray() );
     }
 
     /**
@@ -186,7 +176,7 @@ public class SortedPrefArrayUnitTest
         {
             array.add( elem[i] );
         }
-        System.out.println( array.dumpArray() );
+        // System.out.println( array.dumpArray() );
 
         assertEquals( "Size was not as expected.", maxSize, array.size() );
 
@@ -236,12 +226,12 @@ public class SortedPrefArrayUnitTest
         array.setPreferLarge( true );
 
         array.add( "10" );
-        System.out.println( array.dumpArray() );
+        // System.out.println( array.dumpArray() );
 
         try
         {
             String taken = array.takeNearestLargerOrEqual( "09" );
-            System.out.println( taken );
+            // System.out.println( taken );
             assertNotNull( "taken should not be null, since nothing was in the array", taken
);
         }
         catch ( NullPointerException e )
@@ -314,7 +304,7 @@ public class SortedPrefArrayUnitTest
         for ( int i = 0; i < elem.length; i++ )
         {
             array.add( elem[i] );
-            System.out.println( array.dumpArray() );
+            // System.out.println( array.dumpArray() );
         }
 
         assertEquals( "Size was not as expected.", maxSize, array.size() );
@@ -331,7 +321,7 @@ public class SortedPrefArrayUnitTest
         assertEquals( "Taken is not as expected", "09", taken );
         assertEquals( "Size was not as expected.", ( maxSize - 1 ), array.size() );
 
-        System.out.println( "testTakeLastItem" + array.dumpArray() );
+        // System.out.println( "testTakeLastItem" + array.dumpArray() );
     }
 
     /**
@@ -353,7 +343,7 @@ public class SortedPrefArrayUnitTest
         for ( int i = 0; i < elem.length; i++ )
         {
             array.add( elem[i] );
-            System.out.println( array.dumpArray() );
+            // System.out.println( array.dumpArray() );
         }
 
         assertEquals( "Size was not as expected.", maxSize, array.size() );
@@ -370,7 +360,7 @@ public class SortedPrefArrayUnitTest
         assertEquals( "Taken is not as expected", "09", taken );
         assertEquals( "Size was not as expected. " + array.dumpArray(), ( maxSize - 1 ),
array.size() );
 
-        System.out.println( "testTakeEveryLastItem" + array.dumpArray() );
+        // System.out.println( "testTakeEveryLastItem" + array.dumpArray() );
 
         // take the rest
         // take more than the max in a reverse order
@@ -378,7 +368,7 @@ public class SortedPrefArrayUnitTest
         {
             array.takeNearestLargerOrEqual( elem[i] );
         }
-        System.out.println( "testTakeEveryLastItem" + array.dumpArray() );
+        // System.out.println( "testTakeEveryLastItem" + array.dumpArray() );
 
         assertEquals( "There should nothing left. " + array.dumpArray(), 0, array.size()
);
     }
@@ -399,7 +389,7 @@ public class SortedPrefArrayUnitTest
         for ( int i = 0; i < elem.length; i++ )
         {
             array.add( elem[i] );
-            System.out.println( array.dumpArray() );
+            // System.out.println( array.dumpArray() );
         }
 
         // DO WORK
@@ -426,12 +416,12 @@ public class SortedPrefArrayUnitTest
         for ( int i = 0; i < elem.length; i++ )
         {
             array.add( elem[i] );
-            System.out.println( array.dumpArray() );
+            // System.out.println( array.dumpArray() );
         }
 
         // DO WORK
         Comparable<String> taken = array.takeNearestLargerOrEqual( "03" );
-        System.out.println( "testEqualToGreatest_LastTwoSameSize" + array.dumpArray() );
+        // System.out.println( "testEqualToGreatest_LastTwoSameSize" + array.dumpArray()
);
 
         assertNotNull( "We should have something since the largest element was equal to what
we asked for.", taken );
     }
@@ -452,12 +442,12 @@ public class SortedPrefArrayUnitTest
         for ( int i = 0; i < elem.length; i++ )
         {
             array.add( elem[i] );
-            System.out.println( array.dumpArray() );
+            // System.out.println( array.dumpArray() );
         }
 
         // DO WORK
         Comparable<String> taken = array.takeNearestLargerOrEqual( "03" );
-        System.out.println( "testEqualToGreatest" + array.dumpArray() );
+        // System.out.println( "testEqualToGreatest" + array.dumpArray() );
 
         assertNotNull( "We should have something since the largest element was equal to what
we asked for.", taken );
     }



Mime
View raw message