mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge release/V2.3.0.x into V2.3.
This commit is contained in:
@@ -108,7 +108,7 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
|
|||||||
*
|
*
|
||||||
* @return job query string
|
* @return job query string
|
||||||
*/
|
*/
|
||||||
private String getQuery()
|
protected String getQuery()
|
||||||
{
|
{
|
||||||
if (query == null)
|
if (query == null)
|
||||||
{
|
{
|
||||||
@@ -133,8 +133,8 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
|
|||||||
}
|
}
|
||||||
|
|
||||||
sb.append("))");
|
sb.append("))");
|
||||||
sb.append(" AND ISNULL:\"rma:dispositionActionCompletedAt\" ");
|
sb.append(" AND ISUNSET:\"rma:dispositionActionCompletedAt\" ");
|
||||||
sb.append(" + ( ");
|
sb.append(" AND ( ");
|
||||||
sb.append("@rma\\:dispositionEventsEligible:true ");
|
sb.append("@rma\\:dispositionEventsEligible:true ");
|
||||||
sb.append("OR @rma\\:dispositionAsOf:[MIN TO NOW] ");
|
sb.append("OR @rma\\:dispositionAsOf:[MIN TO NOW] ");
|
||||||
sb.append(") ");
|
sb.append(") ");
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.alfresco.module.org_alfresco_module_rm.job;
|
package org.alfresco.module.org_alfresco_module_rm.job;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.mockito.Matchers.any;
|
import static org.mockito.Matchers.any;
|
||||||
import static org.mockito.Matchers.anyString;
|
import static org.mockito.Matchers.anyString;
|
||||||
import static org.mockito.Matchers.eq;
|
import static org.mockito.Matchers.eq;
|
||||||
@@ -228,4 +229,17 @@ public class DispositionLifecycleJobExecuterUnitTest extends BaseUnitTest
|
|||||||
// ensure no more interactions
|
// ensure no more interactions
|
||||||
verifyNoMoreInteractions(mockedNodeService, mockedRecordsManagementActionService);
|
verifyNoMoreInteractions(mockedNodeService, mockedRecordsManagementActionService);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Brittle unit test that simply checks the generated query is an exact string when the supplied disposition actions
|
||||||
|
* are "CUTOFF" and "RETAIN" (see {@link #before}).
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testGetQuery()
|
||||||
|
{
|
||||||
|
String actual = executer.getQuery();
|
||||||
|
|
||||||
|
String expected = "TYPE:\"rma:dispositionAction\" + (@rma\\:dispositionAction:(\"cutoff\" OR \"retain\")) AND ISUNSET:\"rma:dispositionActionCompletedAt\" AND ( @rma\\:dispositionEventsEligible:true OR @rma\\:dispositionAsOf:[MIN TO NOW] ) ";
|
||||||
|
assertEquals(expected, actual);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user