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)
|
public void setDictionaryService(DictionaryService dictionaryService)
|
||||||
{
|
{
|
||||||
this.dictionaryService = dictionaryService;
|
this.dictionaryService = dictionaryService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.alfresco.module.org_alfresco_module_rm.job.RecordsManagementJobExecuter#executeImpl()
|
* @see org.alfresco.module.org_alfresco_module_rm.job.RecordsManagementJobExecuter#executeImpl()
|
||||||
@@ -130,37 +130,41 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
|||||||
{
|
{
|
||||||
if (nodeService.exists(nodeRef))
|
if (nodeService.exists(nodeRef))
|
||||||
{
|
{
|
||||||
// Mark the update node as publishing in progress
|
boolean publishing = ((Boolean)nodeService.getProperty(nodeRef, PROP_PUBLISH_IN_PROGRESS)).booleanValue();
|
||||||
markPublishInProgress(nodeRef);
|
if (!publishing)
|
||||||
try
|
|
||||||
{
|
{
|
||||||
Date start = new Date();
|
// Mark the update node as publishing in progress
|
||||||
if (logger.isDebugEnabled())
|
markPublishInProgress(nodeRef);
|
||||||
|
try
|
||||||
{
|
{
|
||||||
logger.debug("Starting publish of updates ...");
|
Date start = new Date();
|
||||||
logger.debug(" - for " + nodeRef.toString());
|
if (logger.isDebugEnabled())
|
||||||
logger.debug(" - at " + start.toString());
|
{
|
||||||
|
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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
// Publish updates
|
|
||||||
publishUpdates(nodeRef);
|
|
||||||
|
|
||||||
|
|
||||||
if (logger.isDebugEnabled())
|
|
||||||
{
|
{
|
||||||
Date end = new Date();
|
// Ensure the update node has either completed the publish or is marked as no longer in progress
|
||||||
long duration = end.getTime() - start.getTime();
|
unmarkPublishInProgress(nodeRef);
|
||||||
logger.debug("Completed publish of updates ...");
|
|
||||||
logger.debug(" - for " + nodeRef.toString());
|
|
||||||
logger.debug(" - at " + end.toString());
|
|
||||||
logger.debug(" - duration " + Long.toString(duration));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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
|
// ensure that the rm content model has been loaded
|
||||||
if (dictionaryService != null &&
|
if (dictionaryService != null &&
|
||||||
dictionaryService.getAspect(ASPECT_UNPUBLISHED_UPDATE) != null)
|
dictionaryService.getAspect(ASPECT_UNPUBLISHED_UPDATE) != null)
|
||||||
{
|
{
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
@@ -227,14 +231,14 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
ResultSet results = searchService.query(searchParameters);
|
ResultSet results = searchService.query(searchParameters);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
resultNodes = results.getNodeRefs();
|
resultNodes = results.getNodeRefs();
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
results.close();
|
results.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (AlfrescoRuntimeException exception)
|
catch (AlfrescoRuntimeException exception)
|
||||||
{
|
{
|
||||||
@@ -290,7 +294,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
retryingTransactionHelper.doInTransaction(execution, false, true);
|
retryingTransactionHelper.doInTransaction(execution);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
index.subsystem.name=buildonly
|
|
@@ -218,13 +218,20 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="testPlaceholderConfigurer" class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer">
|
<bean id="Search" class="org.alfresco.repo.management.subsystems.SwitchableApplicationContextFactory" parent="abstractPropertyBackedBean">
|
||||||
<property name="locations">
|
<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>
|
<list>
|
||||||
<value>classpath:alfresco-global-test.properties</value>
|
<value>manager</value>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
<property name="ignoreUnresolvablePlaceholders" value="true" />
|
|
||||||
<property name="order" value="-1" />
|
|
||||||
</bean>
|
</bean>
|
||||||
</beans>
|
</beans>
|
Reference in New Issue
Block a user