You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/08/11 05:21:13 UTC

[camel] branch jetty-fast created (now 4b8e31e2511)

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

davsclaus pushed a change to branch jetty-fast
in repository https://gitbox.apache.org/repos/asf/camel.git


      at 4b8e31e2511 camel-jetty - Make testing faster

This branch includes the following new commits:

     new 4b8e31e2511 camel-jetty - Make testing faster

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[camel] 01/01: camel-jetty - Make testing faster

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch jetty-fast
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 4b8e31e25113c19fcd79cb8c27889900eb089c9a
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Aug 11 07:20:58 2023 +0200

    camel-jetty - Make testing faster
---
 components/camel-jetty/pom.xml                                      | 1 +
 .../test/java/org/apache/camel/component/jetty/InterfacesTest.java  | 2 ++
 .../camel/component/jetty/JettySuspendWhileInProgressTest.java      | 4 ++--
 .../component/jetty/rest/RestJettyRemoveAddRestAndRouteTest.java    | 6 ------
 .../camel/component/jetty/JettyComponentSpringConfiguredTest.xml    | 3 +--
 .../test/resources/org/apache/camel/component/jetty/jetty-https.xml | 1 +
 .../apache/camel/component/jetty/jetty-noconnection-redelivery.xml  | 1 +
 .../org/apache/camel/component/jetty/jetty-noconnection.xml         | 1 +
 8 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/components/camel-jetty/pom.xml b/components/camel-jetty/pom.xml
index 2b180d3c756..f455ae0f761 100644
--- a/components/camel-jetty/pom.xml
+++ b/components/camel-jetty/pom.xml
@@ -33,6 +33,7 @@
     <description>Camel Jetty support</description>
 
     <properties>
+        <camel.surefire.parallel>true</camel.surefire.parallel>
     </properties>
 
     <dependencies>
diff --git a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/InterfacesTest.java b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/InterfacesTest.java
index 4d9ff58b8c4..38d8569e70d 100644
--- a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/InterfacesTest.java
+++ b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/InterfacesTest.java
@@ -27,10 +27,12 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.AvailablePortFinder;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
 import org.junit.jupiter.api.extension.RegisterExtension;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
+@DisabledIfSystemProperty(named = "ci.env.name", matches = "apache.org", disabledReason = "Slow test")
 public class InterfacesTest extends BaseJettyTest {
 
     private static boolean isMacOS = System.getProperty("os.name").startsWith("Mac");
diff --git a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettySuspendWhileInProgressTest.java b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettySuspendWhileInProgressTest.java
index b9290b6e56d..609ef6fee62 100644
--- a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettySuspendWhileInProgressTest.java
+++ b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettySuspendWhileInProgressTest.java
@@ -84,9 +84,9 @@ public class JettySuspendWhileInProgressTest extends BaseJettyTest {
     protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() {
-                from("jetty://" + serverUri).log("Got data will wait 10 sec with reply")
+                from("jetty://" + serverUri).log("Got data will wait 5 sec with reply")
                         .process(e -> latch.countDown())
-                        .delay(10000)
+                        .delay(5000)
                         .transform(simple("Bye ${header.name}"));
             }
         };
diff --git a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/rest/RestJettyRemoveAddRestAndRouteTest.java b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/rest/RestJettyRemoveAddRestAndRouteTest.java
index c51262957a3..69fe3d52116 100644
--- a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/rest/RestJettyRemoveAddRestAndRouteTest.java
+++ b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/rest/RestJettyRemoveAddRestAndRouteTest.java
@@ -28,7 +28,6 @@ import org.junit.jupiter.api.Test;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.fail;
 
 public class RestJettyRemoveAddRestAndRouteTest extends BaseJettyTest {
 
@@ -48,11 +47,6 @@ public class RestJettyRemoveAddRestAndRouteTest extends BaseJettyTest {
 
         assertTrue(removed, "Should have removed route");
 
-        try (InputStream stream = new URL("http://localhost:" + getPort() + "/issues/35").openStream()) {
-            fail();
-        } catch (Exception e) {
-        }
-
         new RouteBuilder(context) {
             @Override
             public void configure() {
diff --git a/components/camel-jetty/src/test/resources/org/apache/camel/component/jetty/JettyComponentSpringConfiguredTest.xml b/components/camel-jetty/src/test/resources/org/apache/camel/component/jetty/JettyComponentSpringConfiguredTest.xml
index 28dea64c3df..f7106aac280 100644
--- a/components/camel-jetty/src/test/resources/org/apache/camel/component/jetty/JettyComponentSpringConfiguredTest.xml
+++ b/components/camel-jetty/src/test/resources/org/apache/camel/component/jetty/JettyComponentSpringConfiguredTest.xml
@@ -31,14 +31,13 @@
 	</bean>
 
 	<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
-
+		<jmxAgent id="jmx" disabled="true"/>
 		<route>
 			<from uri="jetty2:http://localhost:{{port}}/myapp"/>
 			<transform>
 				<simple>Hello ${body}</simple>
 			</transform>
 		</route>
-
 	</camelContext>
 
 </beans>
diff --git a/components/camel-jetty/src/test/resources/org/apache/camel/component/jetty/jetty-https.xml b/components/camel-jetty/src/test/resources/org/apache/camel/component/jetty/jetty-https.xml
index e57e1646c5c..58607eecf64 100644
--- a/components/camel-jetty/src/test/resources/org/apache/camel/component/jetty/jetty-https.xml
+++ b/components/camel-jetty/src/test/resources/org/apache/camel/component/jetty/jetty-https.xml
@@ -37,6 +37,7 @@
     <bean id="dynaPort" class="org.apache.camel.test.AvailablePortFinder" factory-method="find" destroy-method="release" />
 
     <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+        <jmxAgent id="jmx" disabled="true"/>
         <endpoint id="input1" uri="jetty:https://localhost:#{dynaPort.port}/test"/>
 
         <route>
diff --git a/components/camel-jetty/src/test/resources/org/apache/camel/component/jetty/jetty-noconnection-redelivery.xml b/components/camel-jetty/src/test/resources/org/apache/camel/component/jetty/jetty-noconnection-redelivery.xml
index 69dd6de7851..af7d63aa5fb 100644
--- a/components/camel-jetty/src/test/resources/org/apache/camel/component/jetty/jetty-noconnection-redelivery.xml
+++ b/components/camel-jetty/src/test/resources/org/apache/camel/component/jetty/jetty-noconnection-redelivery.xml
@@ -25,6 +25,7 @@
     ">
 
     <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+        <jmxAgent id="jmx" disabled="true"/>
         <endpoint id="httpEndpoint" uri="http://localhost:{{port}}/hi"/>
         <endpoint id="jettyEndpoint" uri="jetty:http://localhost:{{port}}/hi"/>
 
diff --git a/components/camel-jetty/src/test/resources/org/apache/camel/component/jetty/jetty-noconnection.xml b/components/camel-jetty/src/test/resources/org/apache/camel/component/jetty/jetty-noconnection.xml
index db5bb025c8d..bb483938af4 100644
--- a/components/camel-jetty/src/test/resources/org/apache/camel/component/jetty/jetty-noconnection.xml
+++ b/components/camel-jetty/src/test/resources/org/apache/camel/component/jetty/jetty-noconnection.xml
@@ -25,6 +25,7 @@
     ">
 
     <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+        <jmxAgent id="jmx" disabled="true"/>
         <endpoint id="httpEndpoint" uri="http://localhost:{{port}}/hi"/>
         <endpoint id="jettyEndpoint" uri="jetty:http://localhost:{{port}}/hi"/>