Merged 5.2.N (5.2.1) to HEAD (5.2)

131470 idanea: ACE-5463: 500 error: GET /nodes/{nodeId}/comments?skipCount=XXX
      -implemented fix and added new unit test


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@132263 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-11-03 13:52:01 +00:00
parent 807a53b48f
commit 35d61fea98

View File

@@ -777,6 +777,9 @@ public class TestNodeComments extends EnterpriseTestApi
{
assertEquals(HttpStatus.SC_BAD_REQUEST, e.getHttpResponse().getStatusCode());
}
// ACE-5463
testSkipCountHighValue(expectedComments, commentsProxy);
}
@Test
@@ -941,4 +944,21 @@ public class TestNodeComments extends EnterpriseTestApi
commentsProxy.removeNodeComment(nodeRef1.getId(), commentId);
}
// test for retrieving the list of comments with high value of skipCount(e.g. 10)
public void testSkipCountHighValue(List<Comment> expectedComments, Comments commentsProxy) throws PublicApiException
{
try
{
int skipCount = 10;
int maxItems = 2;
Paging paging = getPaging(skipCount, maxItems, expectedComments.size(), expectedComments.size());
commentsProxy.getNodeComments(nodeRef1.getId(), createParams(paging, null));
}
catch (IllegalStateException e)
{
fail();
}
}
}