From 0177f338963c0b73917c4143862a5a37e9ec8721 Mon Sep 17 00:00:00 2001 From: Iuliana Danea Date: Mon, 17 Oct 2016 10:55:17 +0000 Subject: [PATCH] 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 --- .../rest/api/tests/TestNodeComments.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/source/test-java/org/alfresco/rest/api/tests/TestNodeComments.java b/source/test-java/org/alfresco/rest/api/tests/TestNodeComments.java index eb4d85b35e..17d6a1b914 100644 --- a/source/test-java/org/alfresco/rest/api/tests/TestNodeComments.java +++ b/source/test-java/org/alfresco/rest/api/tests/TestNodeComments.java @@ -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 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(); + } + } }