poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1885069 - /poi/trunk/src/ooxml/testcases/org/apache/poi/ooxml/TestTriggerCoverage.java
Date Sun, 03 Jan 2021 17:02:18 GMT
Author: centic
Date: Sun Jan  3 17:02:18 2021
New Revision: 1885069

URL: http://svn.apache.org/viewvc?rev=1885069&view=rev
Log:
Ignore Font-issue with JDK 8 on Windows in another test

Modified:
    poi/trunk/src/ooxml/testcases/org/apache/poi/ooxml/TestTriggerCoverage.java

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/ooxml/TestTriggerCoverage.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/ooxml/TestTriggerCoverage.java?rev=1885069&r1=1885068&r2=1885069&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/ooxml/TestTriggerCoverage.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/ooxml/TestTriggerCoverage.java Sun Jan  3
17:02:18 2021
@@ -33,6 +33,7 @@ import org.junit.jupiter.api.Assumptions
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.Arguments;
 import org.junit.jupiter.params.provider.MethodSource;
+import org.junit.platform.commons.util.ExceptionUtils;
 
 import java.awt.Dimension;
 import java.awt.Graphics2D;
@@ -145,8 +146,19 @@ public class TestTriggerCoverage {
             graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
             graphics.setRenderingHint(Drawable.BUFFERED_IMAGE, new WeakReference<>(img));
 
-            // draw stuff
-            s.draw(graphics);
+            try {
+                // draw stuff
+                s.draw(graphics);
+            } catch (ArrayIndexOutOfBoundsException e) {
+                // We saw exceptions with JDK 8 on Windows in the Jenkins CI which
+                // seem to only be triggered by some font (maybe Calibri?!)
+                // We cannot avoid this, so let's try to not make the tests fail in this
case
+                Assumptions.assumeTrue(
+                        e.getMessage().equals("-1") &&
+                                ExceptionUtils.readStackTrace(e).contains("ExtendedTextSourceLabel.getJustificationInfos"),
+                        "JDK sometimes fails at this point on some fonts on Windows machines,
but we" +
+                                "should not fail the build because of this");
+            }
 
             graphics.dispose();
             img.flush();



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message