Skip to content

Commit 32c1b31

Browse files
author
dmitry.radchuk
committed
Optimize pdfA2 no limit test
There is no need in checking one million pairs We can check limit absence with a slightly larger number and that will also speed up the test The change has been introduced in a view of a test failing on Android (30+ versions) DEVSIX-6565
1 parent 01507c5 commit 32c1b31

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

pdfa/src/test/java/com/itextpdf/pdfa/checker/PdfA2ImplementationLimitsCheckerTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,15 @@ public void arrayCapacityHasNoLimitsTest() {
122122

123123
@Test
124124
public void dictionaryCapacityHasNoLimitsTest() {
125-
126-
PdfDictionary longDictionary = PdfACheckerTestUtils.getLongDictionary(999999);
125+
// Using 9999 dictionary pairs which is more than pdfA1 4095 limit (see PDF/A 4.3.2 Limits)
126+
PdfDictionary longDictionary = PdfACheckerTestUtils.getLongDictionary(9999);
127127

128128
// An exception should not be thrown as there is no limits for capacity of a dictionary
129129
// in PDFA 2
130130
pdfA2Checker.checkPdfObject(longDictionary);
131131

132-
PdfStream longStream = PdfACheckerTestUtils.getStreamWithLongDictionary(999999);
132+
// Using 9999 dictionary pairs which is more than pdfA1 4095 limit (see PDF/A 4.3.2 Limits)
133+
PdfStream longStream = PdfACheckerTestUtils.getStreamWithLongDictionary(9999);
133134

134135
// An exception should not be thrown as there is no limits for capacity of a dictionary
135136
// and stream in PDFA 2

styled-xml-parser/src/test/java/com/itextpdf/styledxmlparser/jsoup/parser/ParserItTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ This file is part of the iText (R) project.
3535

3636
@Category(UnitTest.class)
3737
public class ParserItTest extends ExtendedITextTest {
38-
38+
39+
@Test
3940
public void testIssue1251() {
4041
// https://github.com/jhy/jsoup/issues/1251
4142
String testString = "<a href=\"\"ca";

0 commit comments

Comments
 (0)