This is an automated email from the ASF dual-hosted git repository.

apupier pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 1a1184939929 CAMEL-24026 - avoid system property leak to other tests 
from ZXsltTotalOpsTest
1a1184939929 is described below

commit 1a11849399298037ea4fc15e0c2b58210503b8c6
Author: AurĂ©lien Pupier <[email protected]>
AuthorDate: Tue Jul 21 14:06:25 2026 +0200

    CAMEL-24026 - avoid system property leak to other tests from
    ZXsltTotalOpsTest
    
    due to https://issues.apache.org/jira/browse/CAMEL-24216 , a system
    property is leaking to other tests. it can impact other tests to fail
    when they are played after it. For instance when
    XsltFromFileExceptionTest is flaky, the 2nd and 3rd run are launched
    after it and are failing.
    
    Signed-off-by: AurĂ©lien Pupier <[email protected]>
---
 .../java/org/apache/camel/component/xslt/ZXsltTotalOpsTest.java    | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git 
a/core/camel-core/src/test/java/org/apache/camel/component/xslt/ZXsltTotalOpsTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/component/xslt/ZXsltTotalOpsTest.java
index 5d0ad455237a..b13cc0c7fde4 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/component/xslt/ZXsltTotalOpsTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/component/xslt/ZXsltTotalOpsTest.java
@@ -20,6 +20,7 @@ import javax.xml.transform.TransformerConfigurationException;
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
+import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.parallel.Isolated;
 
@@ -34,6 +35,12 @@ public class ZXsltTotalOpsTest extends ContextTestSupport {
         return false;
     }
 
+    @AfterEach
+    void clearXpathLimit() {
+        // Workaround to https://issues.apache.org/jira/browse/CAMEL-24216
+        System.clearProperty("jdk.xml.xpathTotalOpLimit");
+    }
+
     @Test
     public void testXsltTotalOps() throws Exception {
         context.addRoutes(new RouteBuilder() {

Reply via email to