| |
|
| com.opensymphony.oscache.base.TestConcurrency2
TestConcurrency2 | public class TestConcurrency2 extends TestCase (Code) | | Test the Cache class for any concurrency problems
$Id: TestConcurrency.java 404 2007-02-24 10:21:00Z larst $
version: $Revision: 404 $ |
Method Summary | |
public void | setUp() This method is invoked before each testXXXX methods of the
class. | public static Test | suite() | public void | testConcurrentStaleGets() Checks whether the cache handles simultaneous attempts to access a
stable cache entry correctly when the blocking mode is enabled.
Basically N threads are concurrently trying to access a same stale cache entry and each is cancelling its update. | public void | testNewEntry() | public void | testNewEntryCancel() | public void | testPut() | public void | testStaleEntry() | public void | testStaleEntryBlocking() |
TestConcurrency2 | public TestConcurrency2(String str)(Code) | | Class constructor.
Parameters: str - The test name (required by JUnit) |
setUp | public void setUp()(Code) | | This method is invoked before each testXXXX methods of the
class. It set ups the variables required for each tests.
|
suite | public static Test suite()(Code) | | This methods returns the name of this test class to JUnit
The name of this class |
testConcurrentStaleGets | public void testConcurrentStaleGets()(Code) | | Checks whether the cache handles simultaneous attempts to access a
stable cache entry correctly when the blocking mode is enabled.
Basically N threads are concurrently trying to access a same stale cache entry and each is cancelling its update. Each thread repeat this operation M times.
The test is sucessfull if after some time, all threads are properly released
|
testNewEntry | public void testNewEntry()(Code) | | Check that the cache handles simultaneous attempts to access a
new cache entry correctly
|
testNewEntryCancel | public void testNewEntryCancel()(Code) | | Check that the cache handles simultaneous attempts to access a
new cache entry correctly
|
testPut | public void testPut()(Code) | | Verify that we can concurrently access the cache without problems
|
testStaleEntry | public void testStaleEntry()(Code) | | Check that the cache handles simultaneous attempts to access a
stale cache entry correctly
|
testStaleEntryBlocking | public void testStaleEntryBlocking()(Code) | | A test for the updating of a stale entry when CACHE.BLOCKING = TRUE
|
|
|
|