Skip to content

Commit baa4e7d

Browse files
dmitry.radchukiText-CI
authored andcommitted
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 Autoported commit. Original commit hash: [32c1b3194]
1 parent 02e8a29 commit baa4e7d

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

itext.tests/itext.pdfa.tests/itext/pdfa/checker/PdfA2ImplementationLimitsCheckerTest.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,13 @@ public virtual void ArrayCapacityHasNoLimitsTest() {
9797

9898
[NUnit.Framework.Test]
9999
public virtual void DictionaryCapacityHasNoLimitsTest() {
100-
PdfDictionary longDictionary = PdfACheckerTestUtils.GetLongDictionary(999999);
100+
// Using 9999 dictionary pairs which is more than pdfA1 4095 limit (see PDF/A 4.3.2 Limits)
101+
PdfDictionary longDictionary = PdfACheckerTestUtils.GetLongDictionary(9999);
101102
// An exception should not be thrown as there is no limits for capacity of a dictionary
102103
// in PDFA 2
103104
pdfA2Checker.CheckPdfObject(longDictionary);
104-
PdfStream longStream = PdfACheckerTestUtils.GetStreamWithLongDictionary(999999);
105+
// Using 9999 dictionary pairs which is more than pdfA1 4095 limit (see PDF/A 4.3.2 Limits)
106+
PdfStream longStream = PdfACheckerTestUtils.GetStreamWithLongDictionary(9999);
105107
// An exception should not be thrown as there is no limits for capacity of a dictionary
106108
// and stream in PDFA 2
107109
pdfA2Checker.CheckPdfObject(longStream);

itext.tests/itext.styledxmlparser.tests/itext/styledxmlparser/jsoup/parser/ParserItTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ You should have received a copy of the GNU Affero General Public License
2929
namespace iText.StyledXmlParser.Jsoup.Parser {
3030
/// <summary>Longer running Parser tests.</summary>
3131
public class ParserItTest : ExtendedITextTest {
32+
[NUnit.Framework.Test]
3233
public virtual void TestIssue1251() {
3334
// https://github.com/jhy/jsoup/issues/1251
3435
String testString = "<a href=\"\"ca";

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
01507c54e3b0590356f4fdd2417285d6564905ec
1+
32c1b3194dfe5f5cae361b99d56dc72b5844b25e

0 commit comments

Comments
 (0)