| org.apache.derbyTesting.unitTests.harness.T_MultiIterations org.apache.derbyTesting.unitTests.services.T_LockFactory
T_LockFactory | public class T_LockFactory extends T_MultiIterations (Code) | | Protocol unit test for the LockManager.
See Also: LockFactory See Also: org.apache.derbyTesting.unitTests.harness..UnitTest |
Method Summary | |
void | M001() Multi-user test 001.
Create two lockable objects and pass them off to two threads.
Each thread will run lock the first object, set its value then lock
the second object & set its value, yield and then release the lock
on one and then on two. | void | M002() Multi-user test 002
Create a single lockable and have three threads lock it, yield and
then release it. | void | M003() Multi-user test 003
Create a single lockable and have three threads lock it, yield and
then release it. | void | M004() Multi-user test 004
As M003 but each thread will lock the object twice, to ensure that
lock manager grantes the lock when the compatability space and qualifier
match. | void | S001() Single user API test 001. | void | S002() Single user API test 002. | void | S003() Single user API test 003. | void | S004() Single user API test 004. | void | S005() Single user API test 005. | void | S007() Single user API test 007. | void | S008() Single user API test 008. | void | checkLockCount(Object cs, int expected) Check to see if the total number of locks we have is as expected. | void | checkLockGroupCount(Object cs, Object group, int expected) Check to see if the number of locks in a group we have is as expected. | protected String | getModuleToTestProtocolName() | protected void | runTestSet() Run once per-iteration to run the actual test. | protected void | setupTest() Run all the tests, each test that starts with 'S' is a single user
test, each test that starts with 'M' is a multi-user test. |
ITERATIONS | final protected static int ITERATIONS(Code) | | |
T_LockFactory | public T_LockFactory()(Code) | | |
M001 | void M001() throws StandardException, T_Fail(Code) | | Multi-user test 001.
Create two lockable objects and pass them off to two threads.
Each thread will run lock the first object, set its value then lock
the second object & set its value, yield and then release the lock
on one and then on two. Various checks are made to ensure the
values are as expected.
exception: StandardException - An exception thrown by a method of LockFactory exception: T_Fail - Some behaviour of the LockFactory is incorrect |
M002 | void M002() throws StandardException, T_Fail(Code) | | Multi-user test 002
Create a single lockable and have three threads lock it, yield and
then release it. The single lockable can only have one locker.
exception: StandardException - An exception thrown by a method of LockFactory exception: T_Fail - Some behaviour of the LockFactory is incorrect |
M003 | void M003() throws StandardException, T_Fail(Code) | | Multi-user test 003
Create a single lockable and have three threads lock it, yield and
then release it. The single lockable is a semaphore that can have two lockers.
exception: StandardException - An exception thrown by a method of LockFactory exception: T_Fail - Some behaviour of the LockFactory is incorrect |
M004 | void M004() throws StandardException, T_Fail(Code) | | Multi-user test 004
As M003 but each thread will lock the object twice, to ensure that
lock manager grantes the lock when the compatability space and qualifier
match.
exception: StandardException - An exception thrown by a method of LockFactory exception: T_Fail - Some behaviour of the LockFactory is incorrect |
S001 | void S001() throws StandardException, T_Fail(Code) | | Single user API test 001.
Lock an single object in a single group with all lock methods and
then unlock the object with all unlock methods.
exception: StandardException - An exception thrown by a method of LockFactory exception: T_Fail - Some behaviour of the LockFactory is incorrect |
S002 | void S002() throws StandardException, T_Fail(Code) | | Single user API test 002.
Lock an object in different groups and check unlocks
apply to a single group.
exception: StandardException - An exception thrown by a method of LockFactory exception: T_Fail - Some behaviour of the LockFactory is incorrect |
S003 | void S003() throws StandardException, T_Fail(Code) | | Single user API test 003.
Lock multiple objects in different groups and check unlocks
apply to a single group.
exception: StandardException - An exception thrown by a method of LockFactory exception: T_Fail - Some behaviour of the LockFactory is incorrect |
S004 | void S004() throws StandardException, T_Fail(Code) | | Single user API test 004.
Lock multiple objects in different groups and transfer
locks between groups.
exception: StandardException - An exception thrown by a method of LockFactory exception: T_Fail - Some behaviour of the LockFactory is incorrect |
S005 | void S005() throws StandardException, T_Fail(Code) | | Single user API test 005.
Create two compatability spaces and ensure that locks
block each other out.
exception: StandardException - An exception thrown by a method of LockFactory exception: T_Fail - Some behaviour of the LockFactory is incorrect |
S007 | void S007() throws StandardException, T_Fail(Code) | | Single user API test 007.
Tests on groups and compatibility spaces
never seen by the lock manager.
exception: StandardException - An exception thrown by a method of LockFactory exception: T_Fail - Some behaviour of the LockFactory is incorrect |
S008 | void S008() throws StandardException, T_Fail(Code) | | Single user API test 008.
Create two compatability spaces and ensure that locks/latches
block each other out.
exception: StandardException - An exception thrown by a method of LockFactory exception: T_Fail - Some behaviour of the LockFactory is incorrect |
checkLockCount | void checkLockCount(Object cs, int expected) throws T_Fail(Code) | | Check to see if the total number of locks we have is as expected.
exception: T_Fail - Number of locks is not as expected. |
checkLockGroupCount | void checkLockGroupCount(Object cs, Object group, int expected) throws T_Fail(Code) | | Check to see if the number of locks in a group we have is as expected.
exception: T_Fail - Number of locks is not as expected. |
getModuleToTestProtocolName | protected String getModuleToTestProtocolName()(Code) | | |
runTestSet | protected void runTestSet() throws T_Fail(Code) | | Run once per-iteration to run the actual test.
exception: T_Fail - the test failed in some way. |
setupTest | protected void setupTest() throws T_Fail(Code) | | Run all the tests, each test that starts with 'S' is a single user
test, each test that starts with 'M' is a multi-user test.
exception: T_Fail - The test failed in some way. |
|
|