mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
<< Fix for ActivitiTimerExecutionTest failure on HEAD taking place 50% of the time in last few days >> 85907: Merged DEV (5.0.0.BF) to HEAD-BUG-FIX (5.0/Cloud) 85758: MNT-12398 : FeedNotifier - Users mixed up, fail to send notification email Changed the timing logic in ActivitiTimerExecutionTest to avoid possible deadlocks. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@86051 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2011 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2014 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -256,23 +256,19 @@ public class ActivitiTimerExecutionTest extends BaseSpringTest
|
||||
{
|
||||
String processInstanceId = BPMEngineRegistry.getLocalId(workflowInstanceId);
|
||||
// Job-executor should finish the job, no timers should be available for WF
|
||||
List<Job> timers = activitiProcessEngine.getManagementService().createJobQuery()
|
||||
.timers()
|
||||
.processInstanceId(processInstanceId)
|
||||
.list();
|
||||
|
||||
List<Job> timers = null;
|
||||
int numberOfRetries = 5;
|
||||
for (int i=0; i< numberOfRetries; i++)
|
||||
{
|
||||
if (timers.size() == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
Thread.sleep(1000);
|
||||
Thread.sleep(1500);
|
||||
timers = activitiProcessEngine.getManagementService().createJobQuery()
|
||||
.timers()
|
||||
.processInstanceId(processInstanceId)
|
||||
.list();
|
||||
if (timers.size() == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(timers.size() > 0) {
|
||||
|
Reference in New Issue
Block a user