You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "apupier (via GitHub)" <gi...@apache.org> on 2026/07/20 14:31:43 UTC

[PR] CAMEL-24046 - attempt to avoid flakiness of XsltFromFileExceptionTest by using specific xsl file [camel]

apupier opened a new pull request, #24955:
URL: https://github.com/apache/camel/pull/24955

   
   when it is failing, usually the 2nd and 3rd run are failing with:
   
   ```
   org.apache.camel.FailedToCreateRouteException: Failed to create route:
   route8150 at: >>> to[xslt:org/apache/camel/component/xslt/example.xsl]
   <<< in route:
   Route(route8150)[From[file:/tmp/junit-11867091151342813293?m... because:
   Failed to resolve endpoint:
   xslt://org/apache/camel/component/xslt/example.xsl due to:
   javax.xml.transform.TransformerConfigurationException: JAXP0801003: the
   compiler encountered XPath expressions with an accumulated '2' operators
   that exceeds the '1' limit set by 'system property'.
   ```
   When I checked on the workspace filesystem of a failed build the file camel-core/target/test-classes/org/apache/camel/component/xslt/example.xsl seems fine.
   But maybe the file is locked at that time or modified temporarily by another test, so modified the test to use a specific xsl file for this test class.
   
   Note that it doesn't impact the first flaky failure which is usually another error.
   
   I propose to first try this way to see if we can get rid of the 2nd and 3rd failure, which are causing the build to fail. if there is only the first attempt failing, it is not nice but only flaky and few seconds are lost.
   
   # Description
   
   <!--
   - Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   -->
   
   # Target
   
   - [ ] I checked that the commit is targeting the correct branch (Camel 4 uses the `main` branch)
   
   # Tracking
   - [ ] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it).
   
   <!--
   # *Note*: trivial changes like, typos, minor documentation fixes and other small items do not require a JIRA issue. In this case your pull request should address just this issue, without pulling in other changes.
   -->
   
   # Apache Camel coding standards and style
   
   - [ ] I checked that each commit in the pull request has a meaningful subject line and body.
   
   <!--
   If you're unsure, you can format the pull request title like `[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` with the appropriate JIRA issue.
   -->
   
   - [ ] I have run `mvn clean install -DskipTests` locally from root folder and I have committed all auto-generated changes.
   
   <!--
   You can run the aforementioned command in your module so that the build auto-formats your code. This will also be verified as part of the checks and your PR may be rejected if if there are uncommited changes after running `mvn clean install -DskipTests`.
   
   You can learn more about the contribution guidelines at https://github.com/apache/camel/blob/main/CONTRIBUTING.md
   -->
   
   # AI-assisted contributions
   
   - [ ] If this PR includes AI-generated code, commits have proper co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR description identifies the AI tool used.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-24046 - attempt to avoid flakiness of XsltFromFileExceptionTest by using specific xsl file [camel]

Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on PR #24955:
URL: https://github.com/apache/camel/pull/24955#issuecomment-5033561648

   the 2nd and 3rd failure are occuring after
   
   [INFO] Running org.apache.camel.component.xslt.ZXsltTotalOpsTest
   [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.012 s -- in org.apache.camel.component.xslt.ZXsltTotalOpsTest
   
   but the test is in success and it is significantly after, so it sounds like there is a bug that doesn't set back the property


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-24046 - attempt to avoid flakiness of XsltFromFileExceptionTest by using specific xsl file [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #24955:
URL: https://github.com/apache/camel/pull/24955#issuecomment-5023472099

   :star2: Thank you for your contribution to the Apache Camel project! :star2:
     :robot: CI automation will test this PR automatically.
   
     :camel: Apache Camel Committers, please review the following items:
   
     * First-time contributors **require MANUAL approval** for the GitHub Actions to run
     * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
     * You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
     * Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
     
     :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-24046 - attempt to avoid flakiness of XsltFromFileExceptionTest by using specific xsl file [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #24955:
URL: https://github.com/apache/camel/pull/24955#issuecomment-5023790384

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `core/camel-core`
   
   ---
   
   <details><summary>:microscope: Scalpel shadow comparison — Scalpel: 23 tested, 0 compile-only — current: 0 all tested</summary>
   
   [Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **23 affected modules** (current approach: 0).
   
   <details><summary>:warning: Modules only in Scalpel (23)</summary>
   
   - `camel-console`
   - `camel-core`
   - `camel-csimple-joor`
   - `camel-datasonnet`
   - `camel-groovy`
   - `camel-hl7`
   - `camel-javascript`
   - `camel-joor`
   - `camel-jq`
   - `camel-jsonpath`
   - `camel-main`
   - `camel-management`
   - `camel-mvel`
   - `camel-ognl`
   - `camel-platform-http-jolokia`
   - `camel-python`
   - `camel-saxon`
   - `camel-spring-xml`
   - `camel-stax`
   - `camel-xml-io-dsl`
   - `camel-xml-jaxb-dsl`
   - `camel-xml-jaxb-dsl-test-definition`
   - `camel-xml-jaxb-dsl-test-spring`
   
   </details>
   
   **Skip-tests mode would test 23 modules** (1 direct + 22 downstream), **skip tests for 0** (generated code, meta-modules)
   
   <details><summary>Modules Scalpel would test (23)</summary>
   
   - `camel-console`
   - `camel-core`
   - `camel-csimple-joor`
   - `camel-datasonnet`
   - `camel-groovy`
   - `camel-hl7`
   - `camel-javascript`
   - `camel-joor`
   - `camel-jq`
   - `camel-jsonpath`
   - `camel-main`
   - `camel-management`
   - `camel-mvel`
   - `camel-ognl`
   - `camel-platform-http-jolokia`
   - `camel-python`
   - `camel-saxon`
   - `camel-spring-xml`
   - `camel-stax`
   - `camel-xml-io-dsl`
   - `camel-xml-jaxb-dsl`
   - `camel-xml-jaxb-dsl-test-definition`
   - `camel-xml-jaxb-dsl-test-spring`
   
   </details>
   
   > :information_source: Shadow mode — Scalpel observes but does not affect test execution. [Learn more](https://github.com/maveniverse/scalpel)
   
   </details>
   
   :warning: **Some tests are disabled on GitHub Actions** (`@DisabledIfSystemProperty(named = "ci.env.name")`) and require manual verification:
   
   - `core/camel-core`: 2 test(s) disabled on GitHub Actions
   
   <details><summary>All tested modules (23 modules)</summary>
   
   - Camel :: Console
   - Camel :: Core
   - Camel :: DataSonnet
   - Camel :: Groovy
   - Camel :: HL7
   - Camel :: JQ
   - Camel :: JSon Path
   - Camel :: JavaScript
   - Camel :: MVEL
   - Camel :: Main
   - Camel :: Management
   - Camel :: OGNL (deprecated)
   - Camel :: Platform HTTP :: Jolokia
   - Camel :: Python
   - Camel :: Saxon
   - Camel :: Spring XML
   - Camel :: StAX
   - Camel :: XML DSL Jaxb :: Test :: Definition
   - Camel :: XML DSL Jaxb :: Test :: Spring
   - Camel :: XML DSL with camel-xml-io
   - Camel :: XML DSL with camel-xml-jaxb
   - Camel :: csimple jOOR (deprecated)
   - Camel :: jOOR
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/29751035062)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-24046 - avoid system property leak to other tests from ZXsltTotalOpsTest [camel]

Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on PR #24955:
URL: https://github.com/apache/camel/pull/24955#issuecomment-5043304819

   > The `@AfterEach` cleanup prevents the leak — nice and simple. However, the test mutates system properties via `System.setProperty("jdk.xml.xpathTotalOpLimit", ...)` (inside `XsltComponent.setXpathTotalOpLimit(1)`), so it should also declare a **write-mode** `@ResourceLock`:
   > 
   > ```java
   > import org.junit.jupiter.api.parallel.ResourceLock;
   > import org.junit.jupiter.api.parallel.Resources;
   > 
   > @Isolated
   > @ResourceLock(Resources.SYSTEM_PROPERTIES)
   > public class ZXsltTotalOpsTest extends ContextTestSupport {
   > ```
   > 
   > **Why:** `TestSupport` (the grandparent) declares `@ResourceLock(value = Resources.SYSTEM_PROPERTIES, mode = READ)`, telling JUnit this test only _reads_ system properties. Since this test _writes_ them, the inherited declaration is incorrect — it should be overridden with the default (READ_WRITE) mode.
   > 
   > `@Isolated` already prevents concurrent execution, so this is not a functional bug today, but it's defense in depth and makes the contract explicit.
   
   I will provide a different PR for that as it is not directly related to the initial intent of this PR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-24046 - avoid system property leak to other tests from ZXsltTotalOpsTest [camel]

Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier merged PR #24955:
URL: https://github.com/apache/camel/pull/24955


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-24046 - attempt to avoid flakiness of XsltFromFileExceptionTest by using specific xsl file [camel]

Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on PR #24955:
URL: https://github.com/apache/camel/pull/24955#issuecomment-5033669088

   reported https://issues.apache.org/jira/browse/CAMEL-24216 to fix the spotted issue correctly and wil provide the workaround by unsetting the system property in tear down


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org