mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -1 +0,0 @@
|
||||
index.subsystem.name=buildonly
|
@@ -218,13 +218,20 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="testPlaceholderConfigurer" class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer">
|
||||
<property name="locations">
|
||||
<bean id="Search" class="org.alfresco.repo.management.subsystems.SwitchableApplicationContextFactory" parent="abstractPropertyBackedBean">
|
||||
<property name="autoStart">
|
||||
<value>false</value>
|
||||
</property>
|
||||
<property name="category">
|
||||
<value>Search</value>
|
||||
</property>
|
||||
<property name="sourceBeanName">
|
||||
<value>buildonly</value>
|
||||
</property>
|
||||
<property name="instancePath">
|
||||
<list>
|
||||
<value>classpath:alfresco-global-test.properties</value>
|
||||
<value>manager</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="ignoreUnresolvablePlaceholders" value="true" />
|
||||
<property name="order" value="-1" />
|
||||
</bean>
|
||||
</beans>
|
Reference in New Issue
Block a user