You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tv...@apache.org on 2012/08/04 16:20:34 UTC
svn commit: r1369330 -
/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheSameRegionConcurrentUnitTest.java
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();
}
/**