1 package org.apache.commons.jcs3.auxiliary.disk.indexed;
2
3 import org.apache.commons.jcs3.JCS;
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 import junit.extensions.ActiveTestSuite;
25 import junit.framework.Test;
26 import junit.framework.TestCase;
27
28
29
30
31
32 public class IndexedDiskCacheConcurrentNoDeadLockUnitTest
33 extends TestCase
34 {
35
36
37
38
39
40 public IndexedDiskCacheConcurrentNoDeadLockUnitTest( final String testName )
41 {
42 super( testName );
43 }
44
45
46
47
48
49
50 public static Test suite()
51 {
52 final ActiveTestSuite suite = new ActiveTestSuite();
53
54 suite.addTest( new IndexedDiskCacheRandomConcurrentTestUtil( "testIndexedDiskCache1" )
55 {
56 @Override
57 public void runTest()
58 throws Exception
59 {
60 this.runTestForRegion( "indexedRegion4", 1, 200, 1 );
61 }
62 } );
63
64 suite.addTest( new IndexedDiskCacheRandomConcurrentTestUtil( "testIndexedDiskCache2" )
65 {
66 @Override
67 public void runTest()
68 throws Exception
69 {
70 this.runTestForRegion( "indexedRegion4", 10000, 50000, 2 );
71 }
72 } );
73
74 suite.addTest( new IndexedDiskCacheRandomConcurrentTestUtil( "testIndexedDiskCache3" )
75 {
76 @Override
77 public void runTest()
78 throws Exception
79 {
80 this.runTestForRegion( "indexedRegion4", 10000, 50000, 3 );
81 }
82 } );
83
84 suite.addTest( new IndexedDiskCacheRandomConcurrentTestUtil( "testIndexedDiskCache4" )
85 {
86 @Override
87 public void runTest()
88 throws Exception
89 {
90 this.runTestForRegion( "indexedRegion4", 10000, 50000, 4 );
91 }
92 } );
93
94 suite.addTest( new IndexedDiskCacheRandomConcurrentTestUtil( "testIndexedDiskCache5" )
95 {
96 @Override
97 public void runTest()
98 throws Exception
99 {
100 this.runTestForRegion( "indexedRegion4", 10000, 50000, 5 );
101 }
102 } );
103
104 return suite;
105 }
106
107
108
109
110 @Override
111 public void setUp()
112 {
113 JCS.setConfigFilename( "/TestDiskCacheCon.ccf" );
114 }
115
116
117
118
119 @Override
120 public void tearDown()
121 {
122 JCS.shutdown();
123 }
124 }