This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new 8b74431a1ce ci: Disable PDFBox font-cache-building tests on Windows CI
runners
8b74431a1ce is described below
commit 8b74431a1ce6027e84978ab217a799fd74042a0e
Author: James Netherton <[email protected]>
AuthorDate: Fri Dec 4 07:03:26 2026 +0000
ci: Disable PDFBox font-cache-building tests on Windows CI runners
Co-authored-by: Claude Opus 4.8 <[email protected]>
---
.../langchain4j/ingest/it/Langchain4jIngestTikaTest.java | 9 ++++++++-
.../org/apache/camel/quarkus/component/tika/it/TikaTest.java | 11 +++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git
a/integration-tests/langchain4j-ingest/src/test/java/org/apache/camel/quarkus/component/langchain4j/ingest/it/Langchain4jIngestTikaTest.java
b/integration-tests/langchain4j-ingest/src/test/java/org/apache/camel/quarkus/component/langchain4j/ingest/it/Langchain4jIngestTikaTest.java
index 1f01c7c5669..acc52e35267 100644
---
a/integration-tests/langchain4j-ingest/src/test/java/org/apache/camel/quarkus/component/langchain4j/ingest/it/Langchain4jIngestTikaTest.java
+++
b/integration-tests/langchain4j-ingest/src/test/java/org/apache/camel/quarkus/component/langchain4j/ingest/it/Langchain4jIngestTikaTest.java
@@ -23,7 +23,9 @@ import java.util.concurrent.TimeUnit;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
import io.restassured.http.ContentType;
+import io.smallrye.common.os.OS;
import org.awaitility.Awaitility;
+import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -41,6 +43,11 @@ class Langchain4jIngestTikaTest {
@Test
void pdfIsParsedAndIngested() throws Exception {
+ // Disable on GitHub Actions Windows runners, as FopTest does:
building PDFBox's on-disk font
+ // cache (the fixture's non-embedded Helvetica consults the system
font provider) is too slow
+ // and restoring saved caches is too unreliable there
+ Assumptions.assumeFalse(OS.current().equals(OS.WINDOWS) &&
"true".equals(System.getenv("CI")));
+
RestAssured.given().contentType(ContentType.BINARY)
.body(getClass().getResourceAsStream("/pump.pdf").readAllBytes())
.post("/langchain4j-ingest/binary/reports/pump.pdf")
@@ -48,7 +55,7 @@ class Langchain4jIngestTikaTest {
// generous on purpose: the first PDF parse on a fresh machine builds
PDFBox's on-disk
// font cache (the fixture's non-embedded Helvetica consults the
system font provider),
- // which alone exceeds the usual timeout on Windows CI runners
+ // which alone can exceed the usual timeout
Awaitility.await().atMost(3, TimeUnit.MINUTES).pollInterval(500,
TimeUnit.MILLISECONDS)
.untilAsserted(() -> {
Map<String, String> hit = Langchain4jIngestTest.hit(
diff --git
a/integration-tests/tika/src/test/java/org/apache/camel/quarkus/component/tika/it/TikaTest.java
b/integration-tests/tika/src/test/java/org/apache/camel/quarkus/component/tika/it/TikaTest.java
index 9420aa5eddf..39428439fe5 100644
---
a/integration-tests/tika/src/test/java/org/apache/camel/quarkus/component/tika/it/TikaTest.java
+++
b/integration-tests/tika/src/test/java/org/apache/camel/quarkus/component/tika/it/TikaTest.java
@@ -24,6 +24,7 @@ import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
import io.restassured.http.ContentType;
import io.restassured.response.ValidatableResponse;
+import io.smallrye.common.os.OS;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDPage;
import org.apache.pdfbox.pdmodel.PDPageContentStream;
@@ -33,6 +34,8 @@ import org.apache.pdfbox.pdmodel.font.PDFont;
import org.apache.pdfbox.pdmodel.font.PDType0Font;
import org.apache.pdfbox.pdmodel.font.PDType1Font;
import org.apache.pdfbox.pdmodel.font.Standard14Fonts;
+import org.junit.jupiter.api.Assumptions;
+import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.hamcrest.Matchers.containsString;
@@ -42,6 +45,14 @@ import static org.hamcrest.Matchers.startsWith;
@QuarkusTest
class TikaTest {
+
+ @BeforeEach
+ public void beforeEach() {
+ // Disable on GitHub Actions Windows runners, as FopTest and PdfTest
do: parsing a PDF makes
+ // PDFBox build its on-disk font cache, which is too slow and whose
restore is too unreliable there
+ Assumptions.assumeFalse(OS.current().equals(OS.WINDOWS) &&
"true".equals(System.getenv("CI")));
+ }
+
@Test
public void testOffice() throws Exception {
testParse("test.doc", "application/x-tika-msoffice", null);