RM-1771 (SOLR dependent integration tests failing)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@90205 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2014-11-10 22:32:04 +00:00
parent 2a4e0a3f84
commit 4f1b541035
3 changed files with 54 additions and 44 deletions

View File

@@ -99,12 +99,12 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
}
/**
* @param dictionaryService dictionary service
* @param dictionaryService dictionary service
*/
public void setDictionaryService(DictionaryService dictionaryService)
{
this.dictionaryService = dictionaryService;
}
this.dictionaryService = dictionaryService;
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.job.RecordsManagementJobExecuter#executeImpl()
@@ -130,37 +130,41 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
{
if (nodeService.exists(nodeRef))
{
// Mark the update node as publishing in progress
markPublishInProgress(nodeRef);
try
boolean publishing = ((Boolean)nodeService.getProperty(nodeRef, PROP_PUBLISH_IN_PROGRESS)).booleanValue();
if (!publishing)
{
Date start = new Date();
if (logger.isDebugEnabled())
// Mark the update node as publishing in progress
markPublishInProgress(nodeRef);
try
{
logger.debug("Starting publish of updates ...");
logger.debug(" - for " + nodeRef.toString());
logger.debug(" - at " + start.toString());
Date start = new Date();
if (logger.isDebugEnabled())
{
logger.debug("Starting publish of updates ...");
logger.debug(" - for " + nodeRef.toString());
logger.debug(" - at " + start.toString());
}
// Publish updates
publishUpdates(nodeRef);
if (logger.isDebugEnabled())
{
Date end = new Date();
long duration = end.getTime() - start.getTime();
logger.debug("Completed publish of updates ...");
logger.debug(" - for " + nodeRef.toString());
logger.debug(" - at " + end.toString());
logger.debug(" - duration " + Long.toString(duration));
}
}
// Publish updates
publishUpdates(nodeRef);
if (logger.isDebugEnabled())
finally
{
Date end = new Date();
long duration = end.getTime() - start.getTime();
logger.debug("Completed publish of updates ...");
logger.debug(" - for " + nodeRef.toString());
logger.debug(" - at " + end.toString());
logger.debug(" - duration " + Long.toString(duration));
// Ensure the update node has either completed the publish or is marked as no longer in progress
unmarkPublishInProgress(nodeRef);
}
}
finally
{
// Ensure the update node has either completed the publish or is marked as no longer in progress
unmarkPublishInProgress(nodeRef);
}
}
}
}
@@ -185,7 +189,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
// ensure that the rm content model has been loaded
if (dictionaryService != null &&
dictionaryService.getAspect(ASPECT_UNPUBLISHED_UPDATE) != null)
dictionaryService.getAspect(ASPECT_UNPUBLISHED_UPDATE) != null)
{
result = true;
}
@@ -227,14 +231,14 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
try
{
ResultSet results = searchService.query(searchParameters);
try
{
resultNodes = results.getNodeRefs();
}
finally
{
results.close();
}
try
{
resultNodes = results.getNodeRefs();
}
finally
{
results.close();
}
}
catch (AlfrescoRuntimeException exception)
{
@@ -290,7 +294,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
return null;
}
};
retryingTransactionHelper.doInTransaction(execution, false, true);
retryingTransactionHelper.doInTransaction(execution);
}
/**