Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)

76566: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud)
      76181: MNT-10977: Workflow process retrieval returns incorrect hasMoreItems value
      Additional fix for build failure: https://bamboo.alfresco.com/bamboo/browse/ALF-ENTERPRISEV42BUGFIX-447


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@77632 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2014-07-22 15:31:56 +00:00
parent 615d5bf409
commit cd7943b92a
2 changed files with 20 additions and 4 deletions

View File

@@ -59,6 +59,16 @@ import org.springframework.context.ApplicationContext;
*/
public class ProcessesImplTest extends TestCase
{
private static final String[] CONFIG_LOCATIONS = new String[ApplicationContextHelper.CONFIG_LOCATIONS.length + 2];
static
{
System.arraycopy(ApplicationContextHelper.CONFIG_LOCATIONS, 0, CONFIG_LOCATIONS, 0, ApplicationContextHelper.CONFIG_LOCATIONS.length);
int index = ApplicationContextHelper.CONFIG_LOCATIONS.length;
CONFIG_LOCATIONS[index++] = "classpath:alfresco/public-rest-context.xml";
CONFIG_LOCATIONS[index++] = "classpath:alfresco/web-scripts-application-context.xml";
}
private static final int ACTIVE_WORKFLOWS_INITIAL_AMOUNT = 25;
@@ -70,7 +80,7 @@ public class ProcessesImplTest extends TestCase
private static final String QUERY_STATUS_ACTIVE = "(status=active)";
private ApplicationContext applicationContext = ApplicationContextHelper.getApplicationContext();
private ApplicationContext applicationContext = ApplicationContextHelper.getApplicationContext(CONFIG_LOCATIONS);
private WorkflowService workflowService;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2012 Alfresco Software Limited.
* Copyright (C) 2005-2014 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -921,7 +921,10 @@ public class ProcessWorkflowApiTest extends EnterpriseWorkflowTestApi
assertEquals(2l, paginationJSON.get("count"));
assertEquals(3l, paginationJSON.get("totalItems"));
assertEquals(1l, paginationJSON.get("skipCount"));
assertEquals(true, paginationJSON.get("hasMoreItems"));
// MNT-10977: Workflow process retrieval returns incorrect hasMoreItems value
// Repository must answer 'false' for 'hasMoreItems' since the total number of items is 3, 2 items are requested and 1 is skipped
assertEquals(false, paginationJSON.get("hasMoreItems"));
jsonEntries = (JSONArray) processListJSONObject.get("entries");
assertEquals(2, jsonEntries.size());
@@ -936,7 +939,10 @@ public class ProcessWorkflowApiTest extends EnterpriseWorkflowTestApi
assertEquals(1l, paginationJSON.get("count"));
assertEquals(3l, paginationJSON.get("totalItems"));
assertEquals(2l, paginationJSON.get("skipCount"));
assertEquals(true, paginationJSON.get("hasMoreItems"));
// MNT-10977: Workflow process retrieval returns incorrect hasMoreItems value
// Repository must answer 'false' for 'hasMoreItems' since the total number of items is 3 and 2 items are skipped
assertEquals(false, paginationJSON.get("hasMoreItems"));
jsonEntries = (JSONArray) processListJSONObject.get("entries");
assertEquals(1, jsonEntries.size());
}