commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1369330 - /commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheSameRegionConcurrentUnitTest.java
Date Sat, 04 Aug 2012 14:20:34 GMT
Author: tv
Date: Sat Aug  4 14:20:34 2012
New Revision: 1369330

URL: http://svn.apache.org/viewvc?rev=1369330&view=rev
Log:
Fixed spurious test failures caused by the shutdown kicking in while the concurrent tests
were still running

Modified:
    commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheSameRegionConcurrentUnitTest.java

Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheSameRegionConcurrentUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheSameRegionConcurrentUnitTest.java?rev=1369330&r1=1369329&r2=1369330&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheSameRegionConcurrentUnitTest.java
(original)
+++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheSameRegionConcurrentUnitTest.java
Sat Aug  4 14:20:34 2012
@@ -50,11 +50,15 @@ public class BlockDiskCacheSameRegionCon
      * Main method passes this test to the text test runner.
      * <p>
      * @param args
+     * @throws InterruptedException
      */
-    public static void main( String args[] )
+    public static void main( String args[] ) throws InterruptedException
     {
         String[] testCaseName = { BlockDiskCacheSameRegionConcurrentUnitTest.class.getName()
};
         junit.textui.TestRunner.main( testCaseName );
+
+        // Give test threads some time to finish
+        Thread.sleep(2000);
     }
 
     /**
@@ -118,10 +122,6 @@ public class BlockDiskCacheSameRegionCon
         throws Exception
     {
         JCS.setConfigFilename( "/TestBlockDiskCacheCon.ccf" );
-
-        // tv: For some reason this cleanup does not work as expected so the test fails if
-        // the data files already exist
-        JCS.getInstance( "blockRegion4" ).clear();
     }
 
     /**



Mime
View raw message