org.apache.jcs.auxiliary.disk.indexed
Class IndexedDiskCacheSameRegionConcurrentUnitTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheSameRegionConcurrentUnitTest
All Implemented Interfaces:
junit.framework.Test

public class IndexedDiskCacheSameRegionConcurrentUnitTest
extends junit.framework.TestCase

Test which exercises the indexed disk cache. Runs three threads against the same region.


Constructor Summary
IndexedDiskCacheSameRegionConcurrentUnitTest(String testName)
          Constructor for the TestDiskCache object.
 
Method Summary
static void main(String[] args)
          Main method passes this test to the text test runner.
 void runTestForRegion(String region, int start, int end)
          Adds items to cache, gets them, and removes them.
 void setUp()
          Test setup
static junit.framework.Test suite()
          A unit test suite for JUnit
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndexedDiskCacheSameRegionConcurrentUnitTest

public IndexedDiskCacheSameRegionConcurrentUnitTest(String testName)
Constructor for the TestDiskCache object.

Parameters:
testName -
Method Detail

main

public static void main(String[] args)
Main method passes this test to the text test runner.

Parameters:
args -

suite

public static junit.framework.Test suite()
A unit test suite for JUnit

Returns:
The test suite

setUp

public void setUp()
Test setup

Overrides:
setUp in class junit.framework.TestCase

runTestForRegion

public void runTestForRegion(String region,
                             int start,
                             int end)
                      throws Exception
Adds items to cache, gets them, and removes them. The item count is more than the size of the memory cache, so items should spool to disk.

Parameters:
region - Name of the region to access
start -
end -
Throws:
Exception - If an error occurs


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.