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/BRANCHES/DEV/5.2.N/root@131470 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Iuliana Danea
2016-10-17 10:55:17 +00:00
parent 0ffa19ad19
commit 0177f33896

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();
}
}
}