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 ea79564938 Disable FopTest on GitHub CI for Windows ea79564938 is described below commit ea795649385be6ff47de0ae98d6f89f757404d0b Author: James Netherton <jamesnether...@gmail.com> AuthorDate: Wed Mar 5 15:24:28 2025 +0000 Disable FopTest on GitHub CI for Windows --- .github/workflows/ci-build.yaml | 6 ------ .../java/org/apache/camel/quarkus/component/fop/it/FopTest.java | 9 +++++++++ .../java/org/apache/camel/quarkus/component/pdf/it/PdfTest.java | 9 +++++++++ 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml index ab9b985f76..ea6365c6f3 100644 --- a/.github/workflows/ci-build.yaml +++ b/.github/workflows/ci-build.yaml @@ -532,12 +532,6 @@ jobs: run: | tar -xzf ../maven-repo.tgz -C ~ rm -f ../maven-repo.tgz - - name: PDFBox font cache - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 - if: runner.os == 'Windows' - with: - path: ~/.pdfbox.cache - key: ${{ runner.os }}-pdfbox-cache - name: cd integration-tests && mvn clean verify shell: bash run: | diff --git a/integration-tests/fop/src/test/java/org/apache/camel/quarkus/component/fop/it/FopTest.java b/integration-tests/fop/src/test/java/org/apache/camel/quarkus/component/fop/it/FopTest.java index c2da410823..61cde5251b 100644 --- a/integration-tests/fop/src/test/java/org/apache/camel/quarkus/component/fop/it/FopTest.java +++ b/integration-tests/fop/src/test/java/org/apache/camel/quarkus/component/fop/it/FopTest.java @@ -27,6 +27,7 @@ import java.util.function.Function; import java.util.stream.Stream; import io.quarkus.test.junit.QuarkusTest; +import io.quarkus.utilities.OS; import io.restassured.RestAssured; import io.restassured.http.ContentType; import io.restassured.response.ExtractableResponse; @@ -35,7 +36,9 @@ import org.apache.pdfbox.Loader; import org.apache.pdfbox.io.RandomAccessReadBuffer; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.text.PDFTextStripper; +import org.junit.jupiter.api.Assumptions; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -70,6 +73,12 @@ class FopTest { }); } + @BeforeEach + public void beforeEach() { + // Disable tests on GitHub Actions Windows runners. Font cache building is too slow and restoring saved caches is too unreliable + Assumptions.assumeFalse(OS.determineOS().equals(OS.WINDOWS) && "true".equals(System.getenv("CI"))); + } + @Test public void convertToPdf() throws IOException { convertToPdf(msg -> decorateTextWithXSLFO(msg, null), null); diff --git a/integration-tests/pdf/src/test/java/org/apache/camel/quarkus/component/pdf/it/PdfTest.java b/integration-tests/pdf/src/test/java/org/apache/camel/quarkus/component/pdf/it/PdfTest.java index c50fa39381..23be9a3800 100644 --- a/integration-tests/pdf/src/test/java/org/apache/camel/quarkus/component/pdf/it/PdfTest.java +++ b/integration-tests/pdf/src/test/java/org/apache/camel/quarkus/component/pdf/it/PdfTest.java @@ -19,6 +19,7 @@ package org.apache.camel.quarkus.component.pdf.it; import java.io.IOException; import io.quarkus.test.junit.QuarkusTest; +import io.quarkus.utilities.OS; import io.restassured.RestAssured; import io.restassured.http.ContentType; import org.apache.pdfbox.Loader; @@ -26,6 +27,8 @@ import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException; import org.apache.pdfbox.text.PDFTextStripper; import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Test; @@ -36,6 +39,12 @@ import static org.junit.jupiter.api.Assertions.assertTrue; @QuarkusTest class PdfTest { + @BeforeEach + public void beforeEach() { + // Disable tests on GitHub Actions Windows runners. Font cache building is too slow and restoring saved caches is too unreliable + Assumptions.assumeFalse(OS.determineOS().equals(OS.WINDOWS) && "true".equals(System.getenv("CI"))); + } + @Order(1) @Test public void createFromTextShouldReturnANewPdfDocument() throws IOException {