mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.3-BUG-FIX to HEAD
23430: Merged V3.3 to V3.3-BUG-FIX 23429: Merged PATCHES/V3.2.0 to V3.3 23428: ALF-5141: Further refinement of transaction limiting behaviour - Once accepted a transaction will be retried until it succeeds or the retry limit is exceeded. No limiting of retries by time as otherwise likelihood of any transaction succeeding under load is small - Default web transaction threshold is now 20 seconds to avoid problems on non-loaded systems - Record stack traces of tracked transactions to help debug slow transactions git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@23431 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -571,27 +571,6 @@ public class RetryingTransactionHelperTest extends TestCase
|
||||
{
|
||||
throw new RuntimeException("Unexpected exception", caughtExceptions.get(0));
|
||||
}
|
||||
|
||||
// Check retry limitation
|
||||
long startTime = System.currentTimeMillis();
|
||||
try
|
||||
{
|
||||
txnHelper.doInTransaction(new RetryingTransactionCallback<Void>()
|
||||
{
|
||||
|
||||
public Void execute() throws Throwable
|
||||
{
|
||||
Thread.sleep(1000);
|
||||
throw new ConcurrencyFailureException("Fake concurrency failure");
|
||||
}
|
||||
});
|
||||
fail("Expected TooBusyException");
|
||||
}
|
||||
catch (TooBusyException e)
|
||||
{
|
||||
assertNotNull("Expected cause", e.getCause());
|
||||
assertTrue("Too long", System.currentTimeMillis() < startTime + 5000);
|
||||
}
|
||||
}
|
||||
|
||||
private void runThreads(final RetryingTransactionHelper txnHelper, final List<Throwable> caughtExceptions,
|
||||
|
Reference in New Issue
Block a user