public class RetryingTransactionHelperTest
extends junit.framework.TestCase
RetryingTransactionHelper
,
TransactionService
Constructor and Description |
---|
RetryingTransactionHelperTest() |
Modifier and Type | Method and Description |
---|---|
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() |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
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
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-MySQLjava.lang.InterruptedException
public void testConcurrencyRetryingNoFailure() throws java.lang.InterruptedException
java.lang.InterruptedException
public void testLostConnectionRecovery()
public void testZeroAndNegativeRetries()
public void testTimeLimit()
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.