MNT-17001: Handle overflow condition; improve test to cover

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@133189 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2016-11-28 13:26:14 +00:00
parent 972a52c4f0
commit 41dbd4564b
2 changed files with 12 additions and 1 deletions

View File

@@ -2600,6 +2600,10 @@ public class CMISTest
// and one
changes = cmisService.getContentChanges(repositoryId, new Holder<String>(changeToken), Boolean.TRUE, null, Boolean.FALSE, Boolean.FALSE, BigInteger.valueOf(1), null);
assertEquals("Expected to still get changes", changes.getObjects().size(), 1);
// Integery.MAX_VALUE must be handled
// This will limit the number to a sane value
changes = cmisService.getContentChanges(repositoryId, new Holder<String>(changeToken), Boolean.TRUE, null, Boolean.FALSE, Boolean.FALSE, BigInteger.valueOf(Integer.MAX_VALUE), null);
assertTrue("Expected to still get changes", changes.getObjects().size() >= expectAtLeast);
// but not negative
try
{