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

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

public class IndexedDiskCacheRandomConcurrentTestUtil
extends junit.framework.TestCase

This is used by other tests to generate a random load on the disk cache.


Constructor Summary
IndexedDiskCacheRandomConcurrentTestUtil(String testName)
          Constructor for the TestDiskCache object.
 
Method Summary
 void runTestForRegion(String region, int range, int numOps, int testNum)
          Randomly adds items to cache, gets them, and removes them.
 void setUp()
          Test setup
 
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

IndexedDiskCacheRandomConcurrentTestUtil

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

Parameters:
testName -
Method Detail

runTestForRegion

public void runTestForRegion(String region,
                             int range,
                             int numOps,
                             int testNum)
                      throws Exception
Randomly adds items to cache, gets them, and removes them. The range count is more than the size of the memory cache, so items should spool to disk.

Parameters:
region - Name of the region to access
range -
numOps -
testNum -
Throws:
Exception - If an error occurs

setUp

public void setUp()
Test setup

Overrides:
setUp in class junit.framework.TestCase


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