public class StressTestNonBlockingLockManagerWithPredeclaredLocks extends AbstractStressTestNonBlockingLockManager
TxDag
since deadlocks CAN NOT
arise.AbstractStressTestNonBlockingLockManager.Generate, AbstractStressTestNonBlockingLockManager.TestOptions, AbstractStressTestNonBlockingLockManager.Wait10ResourceTask<T>
DEBUG, INFO, log
Constructor and Description |
---|
StressTestNonBlockingLockManagerWithPredeclaredLocks() |
StressTestNonBlockingLockManagerWithPredeclaredLocks(String name) |
Modifier and Type | Method and Description |
---|---|
void |
test_multipleResourceLocking_resources10_predeclareLocks_synchronousQueue_locktries10()
Test where each operation locks one or more resources.
|
void |
test_multipleResourceLocking_resources10_predeclareLocks_unboundedQueue_locktries10()
Test where each operation locks one or more resources.
|
void |
test_noResourcesDoesNotWait_predeclareLocks_synchronousQueue()
Test where no locks are declared.
|
void |
test_noResourcesDoesNotWait_predeclareLocks_unboundedQueue()
Test where no locks are declared.
|
doComparisonTest, setUpComparisonTest, tearDownComparisonTest
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
public StressTestNonBlockingLockManagerWithPredeclaredLocks()
public StressTestNonBlockingLockManagerWithPredeclaredLocks(String name)
public void test_noResourcesDoesNotWait_predeclareLocks_unboundedQueue() throws Exception
Exception
public void test_noResourcesDoesNotWait_predeclareLocks_synchronousQueue() throws Exception
Exception
public void test_multipleResourceLocking_resources10_predeclareLocks_unboundedQueue_locktries10() throws Exception
Note: This condition provides the basis for deadlocks. In fact, since we have 10 resource locks for each operation and only 100 operations the chances of a deadlock on any given operation are extremely high. However, since we are predeclaring our locks and the lock requests are being sorted NO deadlocks should result.
Note: Tasks are not necessarily serialized for this case since there are 100 resources, so even though each task obtains 10 locks it is possible for tasks to have non-overlapping lock requests and therefore there can be more than one task executing concurrently.
Exception
public void test_multipleResourceLocking_resources10_predeclareLocks_synchronousQueue_locktries10() throws Exception
Note: This condition provides the basis for deadlocks. In fact, since we have 10 resource locks for each operation and only 100 operations the chances of a deadlock on any given operation are extremely high. However, since we are predeclaring our locks and the lock requests are being sorted NO deadlocks should result.
Note: Tasks are not necessarily serialized for this case since there are 100 resources, so even though each task obtains 10 locks it is possible for tasks to have non-overlapping lock requests and therefore there can be more than one task executing concurrently.
Exception
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.