You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2022/02/09 21:14:03 UTC
[camel-quarkus-examples] branch camel-quarkus-main updated (faf8979 -> 9921ac6)
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a change to branch camel-quarkus-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus-examples.git.
from faf8979 Fix observability example native profile quarkus-maven-plugin declaration
new 5db1b62 Remove references to health configuration options that no longer exist in Camel 3.16
new 9921ac6 Set quarkus.platform.version to 2.7.1.Final
The 2 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.
Summary of changes:
aws-lambda/pom.xml | 2 +-
file-bindy-ftp/pom.xml | 2 +-
file-split-log-xml/pom.xml | 2 +-
health/pom.xml | 2 +-
health/src/main/resources/application.properties | 14 -----
.../src/test/java/org/acme/health/HealthTest.java | 41 +++----------
http-log/pom.xml | 2 +-
jdbc-datasource/pom.xml | 2 +-
kafka/pom.xml | 2 +-
kamelet-chucknorris/pom.xml | 2 +-
observability/pom.xml | 2 +-
.../org/acme/observability/ObservabilityTest.java | 70 +++++-----------------
rest-json/pom.xml | 2 +-
timer-log-cdi/pom.xml | 2 +-
timer-log-kotlin/pom.xml | 2 +-
timer-log-main/pom.xml | 2 +-
timer-log-spring/pom.xml | 2 +-
timer-log-xml/pom.xml | 2 +-
timer-log/pom.xml | 2 +-
19 files changed, 40 insertions(+), 117 deletions(-)
[camel-quarkus-examples] 01/02: Remove references to health configuration options that no longer exist in Camel 3.16
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch camel-quarkus-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus-examples.git
commit 5db1b6255f818b9131f919402d7c456766db9ebd
Author: James Netherton <ja...@gmail.com>
AuthorDate: Wed Feb 9 15:43:31 2022 +0000
Remove references to health configuration options that no longer exist in Camel 3.16
---
health/src/main/resources/application.properties | 14 -----
.../src/test/java/org/acme/health/HealthTest.java | 41 +++----------
.../org/acme/observability/ObservabilityTest.java | 70 +++++-----------------
3 files changed, 24 insertions(+), 101 deletions(-)
diff --git a/health/src/main/resources/application.properties b/health/src/main/resources/application.properties
index 0e06a96..afe6384 100644
--- a/health/src/main/resources/application.properties
+++ b/health/src/main/resources/application.properties
@@ -58,23 +58,9 @@ camel.health.registry-enabled = true
#camel.health.config[netty].parent = routes
#camel.health.config[netty].enabled = false
-# and configure each individually
-camel.health.config[timer].parent = routes
-camel.health.config[timer].interval = 5s
-camel.health.config[netty].parent = routes
-camel.health.config[netty].interval = 20s
-camel.health.config[netty].failure-threshold = 10
-
# find grained routes configuration per route (support wildcards)
# (enabled is default true for discovered health-checks)
#camel.health.config[*].enabled = true
-# allow 5 failures with 10s apart as slack to handle routes being flaky
-# however if after 5 failures then the state will be regarded as DOWN onwards
-# (the route can recover and the state will then be UP)
-#camel.health.config[*].parent = routes
-#camel.health.config[*].interval = 10s
-#camel.health.config[*].failure-threshold = 5
-
# properties used in the route
myPeriod = 10s
diff --git a/health/src/test/java/org/acme/health/HealthTest.java b/health/src/test/java/org/acme/health/HealthTest.java
index 7984a70..417a3f2 100644
--- a/health/src/test/java/org/acme/health/HealthTest.java
+++ b/health/src/test/java/org/acme/health/HealthTest.java
@@ -18,48 +18,23 @@ package org.acme.health;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
-import org.apache.camel.CamelContext;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.Test;
import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.Matchers.containsInAnyOrder;
@QuarkusTest
public class HealthTest {
@Test
public void testHealth() throws InterruptedException {
- if (isAggregatedHealthResponse()) {
- RestAssured.get("/q/health")
- .then()
- .statusCode(503)
- .body("status", is("DOWN"),
- "checks.status", containsInAnyOrder("DOWN", "UP"),
- "checks.name",
- containsInAnyOrder("camel-readiness-checks", "camel-liveness-checks"),
- "checks.data.context", containsInAnyOrder(null, "UP"));
- } else {
- RestAssured.get("/q/health")
- .then()
- .statusCode(503)
- .body("status", is("DOWN"),
- "checks.findAll { it.name == 'toolong' }.status", Matchers.contains("UP"),
- "checks.findAll { it.name == 'context' }.status", Matchers.contains("UP"),
- "checks.findAll { it.name == 'camel-routes' }.status", Matchers.contains("UP"),
- "checks.findAll { it.name == 'camel-consumers' }.status", Matchers.contains("DOWN"));
- }
- }
-
- /**
- * The JSON structure produced by camel-microprofile-health in Camel >= 3.15 is different to that
- * produced in previous versions. This check allows the tests to handle both formats.
- *
- * TODO: Remove when examples upgraded to >= Camel 3.15
- */
- private boolean isAggregatedHealthResponse() {
- String version = CamelContext.class.getPackage().getImplementationVersion();
- String[] versionParts = version.split("\\.");
- return Integer.parseInt(versionParts[1]) < 15;
+ RestAssured.get("/q/health")
+ .then()
+ .statusCode(503)
+ .body("status", is("DOWN"),
+ "checks.findAll { it.name == 'toolong' }.status", Matchers.contains("UP"),
+ "checks.findAll { it.name == 'context' }.status", Matchers.contains("UP"),
+ "checks.findAll { it.name == 'camel-routes' }.status", Matchers.contains("DOWN"),
+ "checks.findAll { it.name == 'camel-consumers' }.status", Matchers.contains("DOWN"));
}
}
diff --git a/observability/src/test/java/org/acme/observability/ObservabilityTest.java b/observability/src/test/java/org/acme/observability/ObservabilityTest.java
index 6d4b979..e87b19a 100644
--- a/observability/src/test/java/org/acme/observability/ObservabilityTest.java
+++ b/observability/src/test/java/org/acme/observability/ObservabilityTest.java
@@ -20,14 +20,11 @@ import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
import io.restassured.http.ContentType;
import io.restassured.path.json.JsonPath;
-import org.apache.camel.CamelContext;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.Test;
import static io.restassured.RestAssured.given;
-import static org.hamcrest.CoreMatchers.hasItems;
import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.junit.jupiter.api.Assertions.assertTrue;
@QuarkusTest
@@ -56,57 +53,22 @@ public class ObservabilityTest {
@Test
public void health() {
- if (isAggregatedHealthResponse()) {
- // Verify liveness
- given()
- .when().accept(ContentType.JSON)
- .get("/q/health/live")
- .then()
- .statusCode(200)
- .body("status", Matchers.is("UP"),
- "checks.name", containsInAnyOrder("camel-liveness-checks"),
- "checks.data.custom-liveness-check", containsInAnyOrder("UP"));
-
- // Verify readiness
- given()
- .when().accept(ContentType.JSON)
- .get("/q/health/ready")
- .then()
- .statusCode(200)
- .body("status", Matchers.is("UP"),
- "checks.name",
- hasItems("camel-readiness-checks", "Uptime readiness check"),
- "checks.data.custom-readiness-check", containsInAnyOrder("UP"));
- } else {
- // Verify liveness
- RestAssured.get("/q/health/live")
- .then()
- .statusCode(200)
- .body("status", is("UP"),
- "checks.findAll { it.name == 'custom-liveness-check' }.status", Matchers.contains("UP"));
-
- // Verify readiness
- RestAssured.get("/q/health/ready")
- .then()
- .statusCode(200)
- .body("status", is("UP"),
- "checks.findAll { it.name == 'custom-readiness-check' }.status", Matchers.contains("UP"),
- "checks.findAll { it.name == 'Uptime readiness check' }.status", Matchers.contains("UP"),
- "checks.findAll { it.name == 'context' }.status", Matchers.contains("UP"),
- "checks.findAll { it.name == 'camel-routes' }.status", Matchers.contains("UP"),
- "checks.findAll { it.name == 'camel-consumers' }.status", Matchers.contains("UP"));
- }
- }
+ // Verify liveness
+ RestAssured.get("/q/health/live")
+ .then()
+ .statusCode(200)
+ .body("status", is("UP"),
+ "checks.findAll { it.name == 'custom-liveness-check' }.status", Matchers.contains("UP"));
- /**
- * The JSON structure produced by camel-microprofile-health in Camel >= 3.15 is different to that
- * produced in previous versions. This check allows the tests to handle both formats.
- *
- * TODO: Remove when examples upgraded to >= Camel 3.15
- */
- private boolean isAggregatedHealthResponse() {
- String version = CamelContext.class.getPackage().getImplementationVersion();
- String[] versionParts = version.split("\\.");
- return Integer.parseInt(versionParts[1]) < 15;
+ // Verify readiness
+ RestAssured.get("/q/health/ready")
+ .then()
+ .statusCode(200)
+ .body("status", is("UP"),
+ "checks.findAll { it.name == 'custom-readiness-check' }.status", Matchers.contains("UP"),
+ "checks.findAll { it.name == 'Uptime readiness check' }.status", Matchers.contains("UP"),
+ "checks.findAll { it.name == 'context' }.status", Matchers.contains("UP"),
+ "checks.findAll { it.name == 'camel-routes' }.status", Matchers.contains("UP"),
+ "checks.findAll { it.name == 'camel-consumers' }.status", Matchers.contains("UP"));
}
}
[camel-quarkus-examples] 02/02: Set quarkus.platform.version to 2.7.1.Final
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch camel-quarkus-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus-examples.git
commit 9921ac6571405643bbbd8818483e912cb6a40364
Author: James Netherton <ja...@gmail.com>
AuthorDate: Wed Feb 9 17:43:47 2022 +0000
Set quarkus.platform.version to 2.7.1.Final
---
aws-lambda/pom.xml | 2 +-
file-bindy-ftp/pom.xml | 2 +-
file-split-log-xml/pom.xml | 2 +-
health/pom.xml | 2 +-
http-log/pom.xml | 2 +-
jdbc-datasource/pom.xml | 2 +-
kafka/pom.xml | 2 +-
kamelet-chucknorris/pom.xml | 2 +-
observability/pom.xml | 2 +-
rest-json/pom.xml | 2 +-
timer-log-cdi/pom.xml | 2 +-
timer-log-kotlin/pom.xml | 2 +-
timer-log-main/pom.xml | 2 +-
timer-log-spring/pom.xml | 2 +-
timer-log-xml/pom.xml | 2 +-
timer-log/pom.xml | 2 +-
16 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/aws-lambda/pom.xml b/aws-lambda/pom.xml
index d7ceaea..c641707 100644
--- a/aws-lambda/pom.xml
+++ b/aws-lambda/pom.xml
@@ -27,7 +27,7 @@
<description>Camel Quarkus Example :: Deploying a Camel Route in AWS Lambda</description>
<properties>
- <quarkus.platform.version>2.7.0.Final</quarkus.platform.version>
+ <quarkus.platform.version>2.7.1.Final</quarkus.platform.version>
<camel-quarkus.platform.version>2.8.0-SNAPSHOT</camel-quarkus.platform.version>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
diff --git a/file-bindy-ftp/pom.xml b/file-bindy-ftp/pom.xml
index 2bd3594..e663c2f 100644
--- a/file-bindy-ftp/pom.xml
+++ b/file-bindy-ftp/pom.xml
@@ -28,7 +28,7 @@
<description>Camel Quarkus Example :: File Bindy FTP</description>
<properties>
- <quarkus.platform.version>2.7.0.Final</quarkus.platform.version>
+ <quarkus.platform.version>2.7.1.Final</quarkus.platform.version>
<camel-quarkus.platform.version>2.8.0-SNAPSHOT</camel-quarkus.platform.version>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
diff --git a/file-split-log-xml/pom.xml b/file-split-log-xml/pom.xml
index de6fc71..76d4ea1 100644
--- a/file-split-log-xml/pom.xml
+++ b/file-split-log-xml/pom.xml
@@ -28,7 +28,7 @@
<description>Camel Quarkus Example :: File To Log XML DSL</description>
<properties>
- <quarkus.platform.version>2.7.0.Final</quarkus.platform.version>
+ <quarkus.platform.version>2.7.1.Final</quarkus.platform.version>
<camel-quarkus.platform.version>2.8.0-SNAPSHOT</camel-quarkus.platform.version>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
diff --git a/health/pom.xml b/health/pom.xml
index bf59d3d..7de6afc 100644
--- a/health/pom.xml
+++ b/health/pom.xml
@@ -28,7 +28,7 @@
<description>Camel Quarkus Example :: Health Check</description>
<properties>
- <quarkus.platform.version>2.7.0.Final</quarkus.platform.version>
+ <quarkus.platform.version>2.7.1.Final</quarkus.platform.version>
<camel-quarkus.platform.version>2.8.0-SNAPSHOT</camel-quarkus.platform.version>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
diff --git a/http-log/pom.xml b/http-log/pom.xml
index 7e19f06..1fd52c2 100644
--- a/http-log/pom.xml
+++ b/http-log/pom.xml
@@ -28,7 +28,7 @@
<description>Camel Quarkus Example :: HTTP to Log</description>
<properties>
- <quarkus.platform.version>2.7.0.Final</quarkus.platform.version>
+ <quarkus.platform.version>2.7.1.Final</quarkus.platform.version>
<camel-quarkus.platform.version>2.8.0-SNAPSHOT</camel-quarkus.platform.version>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
diff --git a/jdbc-datasource/pom.xml b/jdbc-datasource/pom.xml
index e6ada41..1f538a14 100644
--- a/jdbc-datasource/pom.xml
+++ b/jdbc-datasource/pom.xml
@@ -25,7 +25,7 @@
<name>Camel Quarkus :: Examples :: Jdbc - DatataSource - Log</name>
<description>Camel Quarkus Example :: Connect to Database using Datasource</description>
<properties>
- <quarkus.platform.version>2.7.0.Final</quarkus.platform.version>
+ <quarkus.platform.version>2.7.1.Final</quarkus.platform.version>
<camel-quarkus.platform.version>2.8.0-SNAPSHOT</camel-quarkus.platform.version>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
diff --git a/kafka/pom.xml b/kafka/pom.xml
index 73d6466..dcd16b8 100644
--- a/kafka/pom.xml
+++ b/kafka/pom.xml
@@ -28,7 +28,7 @@
<description>Camel Quarkus Example :: Kafka</description>
<properties>
- <quarkus.platform.version>2.7.0.Final</quarkus.platform.version>
+ <quarkus.platform.version>2.7.1.Final</quarkus.platform.version>
<camel-quarkus.platform.version>2.8.0-SNAPSHOT</camel-quarkus.platform.version>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
diff --git a/kamelet-chucknorris/pom.xml b/kamelet-chucknorris/pom.xml
index 2f14f16..93ce679 100644
--- a/kamelet-chucknorris/pom.xml
+++ b/kamelet-chucknorris/pom.xml
@@ -28,7 +28,7 @@
<description>Camel Quarkus Example :: Kamelet Chuck Norris</description>
<properties>
- <quarkus.platform.version>2.7.0.Final</quarkus.platform.version>
+ <quarkus.platform.version>2.7.1.Final</quarkus.platform.version>
<camel-quarkus.platform.version>2.8.0-SNAPSHOT</camel-quarkus.platform.version>
<!-- TODO: https://github.com/apache/camel-quarkus/issues/3156 -->
diff --git a/observability/pom.xml b/observability/pom.xml
index d5bd763..5052792 100644
--- a/observability/pom.xml
+++ b/observability/pom.xml
@@ -29,7 +29,7 @@
<properties>
- <quarkus.platform.version>2.7.0.Final</quarkus.platform.version>
+ <quarkus.platform.version>2.7.1.Final</quarkus.platform.version>
<camel-quarkus.platform.version>2.8.0-SNAPSHOT</camel-quarkus.platform.version>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
diff --git a/rest-json/pom.xml b/rest-json/pom.xml
index bd97cf7..5aed06e 100644
--- a/rest-json/pom.xml
+++ b/rest-json/pom.xml
@@ -28,7 +28,7 @@
<description>Camel Quarkus Example :: Rest Json</description>
<properties>
- <quarkus.platform.version>2.7.0.Final</quarkus.platform.version>
+ <quarkus.platform.version>2.7.1.Final</quarkus.platform.version>
<camel-quarkus.platform.version>2.8.0-SNAPSHOT</camel-quarkus.platform.version>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
diff --git a/timer-log-cdi/pom.xml b/timer-log-cdi/pom.xml
index bc3dc05..9f42d57 100644
--- a/timer-log-cdi/pom.xml
+++ b/timer-log-cdi/pom.xml
@@ -28,7 +28,7 @@
<description>Camel Quarkus Example :: Timer to Log CDI</description>
<properties>
- <quarkus.platform.version>2.7.0.Final</quarkus.platform.version>
+ <quarkus.platform.version>2.7.1.Final</quarkus.platform.version>
<camel-quarkus.platform.version>2.8.0-SNAPSHOT</camel-quarkus.platform.version>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
diff --git a/timer-log-kotlin/pom.xml b/timer-log-kotlin/pom.xml
index 86e0fe1..2c71e02 100644
--- a/timer-log-kotlin/pom.xml
+++ b/timer-log-kotlin/pom.xml
@@ -28,7 +28,7 @@
<description>Camel Quarkus Example :: Timer to Log Kotlin</description>
<properties>
- <quarkus.platform.version>2.7.0.Final</quarkus.platform.version>
+ <quarkus.platform.version>2.7.1.Final</quarkus.platform.version>
<camel-quarkus.platform.version>2.8.0-SNAPSHOT</camel-quarkus.platform.version>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
diff --git a/timer-log-main/pom.xml b/timer-log-main/pom.xml
index 3512b3f..5ef4961 100644
--- a/timer-log-main/pom.xml
+++ b/timer-log-main/pom.xml
@@ -28,7 +28,7 @@
<description>Camel Quarkus Example :: Timer to Log Main</description>
<properties>
- <quarkus.platform.version>2.7.0.Final</quarkus.platform.version>
+ <quarkus.platform.version>2.7.1.Final</quarkus.platform.version>
<camel-quarkus.platform.version>2.8.0-SNAPSHOT</camel-quarkus.platform.version>
<!-- TODO: https://github.com/apache/camel-quarkus/issues/3156 -->
diff --git a/timer-log-spring/pom.xml b/timer-log-spring/pom.xml
index ab7298a..f195837 100644
--- a/timer-log-spring/pom.xml
+++ b/timer-log-spring/pom.xml
@@ -28,7 +28,7 @@
<description>Camel Quarkus Example :: Timer to Log Spring</description>
<properties>
- <quarkus.platform.version>2.7.0.Final</quarkus.platform.version>
+ <quarkus.platform.version>2.7.1.Final</quarkus.platform.version>
<camel-quarkus.platform.version>2.8.0-SNAPSHOT</camel-quarkus.platform.version>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
diff --git a/timer-log-xml/pom.xml b/timer-log-xml/pom.xml
index f4196ee..59b403a 100644
--- a/timer-log-xml/pom.xml
+++ b/timer-log-xml/pom.xml
@@ -28,7 +28,7 @@
<description>Camel Quarkus Example :: Timer to Log XML</description>
<properties>
- <quarkus.platform.version>2.7.0.Final</quarkus.platform.version>
+ <quarkus.platform.version>2.7.1.Final</quarkus.platform.version>
<camel-quarkus.platform.version>2.8.0-SNAPSHOT</camel-quarkus.platform.version>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
diff --git a/timer-log/pom.xml b/timer-log/pom.xml
index ceba804..5485ebe 100644
--- a/timer-log/pom.xml
+++ b/timer-log/pom.xml
@@ -28,7 +28,7 @@
<description>Camel Quarkus Example :: Timer to Log</description>
<properties>
- <quarkus.platform.version>2.7.0.Final</quarkus.platform.version>
+ <quarkus.platform.version>2.7.1.Final</quarkus.platform.version>
<camel-quarkus.platform.version>2.8.0-SNAPSHOT</camel-quarkus.platform.version>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>