|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.alfresco.repo.transaction.RetryingTransactionHelperTest
public class RetryingTransactionHelperTest
Tests the transaction retrying behaviour with various failure modes.
RetryingTransactionHelper
,
TransactionService
Constructor Summary | |
---|---|
RetryingTransactionHelperTest()
|
Method Summary | |
---|---|
void |
setUp()
|
void |
tearDown()
|
void |
testConcurrencyRetryingNoFailure()
|
void |
testLostConnectionRecovery()
|
void |
testNestedWithoutPropogation()
Checks nesting of two transactions with requiresNew == true |
void |
testNestedWithoutPropogationConcurrentUntilFailureMySQL()
Checks nesting of two transactions with requiresNew == true ,
but where the two transactions get involved in a concurrency struggle. |
void |
testNestedWithPropogation()
Checks nesting of two transactions with requiresNew == false |
void |
testNonRetryingFailure()
Checks that a non-retrying exception is passed out and that the transaction is rolled back. |
void |
testNonRetryingSilentRollback()
Sometimes, exceptions or other states may cause the transaction to be marked for rollback without an exception being generated. |
void |
testSetUp()
|
void |
testSuccessNoRetry()
Check that it works without complications. |
void |
testSuccessWithRetry()
Check that the retries happening for simple concurrency exceptions |
void |
testTimeLimit()
|
void |
testUserTransactionStatus()
Check that the transaction state can be fetched in and around the transaction. |
void |
testZeroAndNegativeRetries()
|
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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, failNotEquals, failNotSame, failSame, format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RetryingTransactionHelperTest()
Method Detail |
---|
public void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
public void tearDown() throws java.lang.Exception
tearDown
in class junit.framework.TestCase
java.lang.Exception
public void testSetUp() throws java.lang.Exception
java.lang.Exception
public void testSuccessNoRetry()
public void testUserTransactionStatus()
public void testSuccessWithRetry()
public void testNonRetryingFailure()
public void testNonRetryingSilentRollback()
public void testNestedWithPropogation()
requiresNew == false
public void testNestedWithoutPropogation()
requiresNew == true
public void testNestedWithoutPropogationConcurrentUntilFailureMySQL() throws java.lang.InterruptedException
requiresNew == true
,
but where the two transactions get involved in a concurrency struggle.
Note: skip test for non-MySQL
java.lang.InterruptedException
public void testConcurrencyRetryingNoFailure() throws java.lang.InterruptedException
java.lang.InterruptedException
public void testLostConnectionRecovery()
public void testZeroAndNegativeRetries()
public void testTimeLimit()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |