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/07/12 14:36:52 UTC
[camel] branch main updated: CAMEL-19604: camel-knative - Fix test support for setting up vertx used during testing.
This is an automated email from the ASF dual-hosted git repository.
davsclaus 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 9d42b3e302f CAMEL-19604: camel-knative - Fix test support for setting up vertx used during testing.
9d42b3e302f is described below
commit 9d42b3e302f17ddded100348fdd6c6587b1f92d9
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Jul 12 16:36:41 2023 +0200
CAMEL-19604: camel-knative - Fix test support for setting up vertx used during testing.
---
.../knative/http/KnativeHttpTestSupport.java | 29 ++++++++++++++--------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/components/camel-knative/camel-knative-http/src/test/java/org/apache/camel/component/knative/http/KnativeHttpTestSupport.java b/components/camel-knative/camel-knative-http/src/test/java/org/apache/camel/component/knative/http/KnativeHttpTestSupport.java
index c9448231d1f..b79c05ddb90 100644
--- a/components/camel-knative/camel-knative-http/src/test/java/org/apache/camel/component/knative/http/KnativeHttpTestSupport.java
+++ b/components/camel-knative/camel-knative-http/src/test/java/org/apache/camel/component/knative/http/KnativeHttpTestSupport.java
@@ -89,17 +89,7 @@ public final class KnativeHttpTestSupport {
configuration.setBindPort(bindPort);
try {
- camelContext.addService(new VertxPlatformHttpServer(configuration) {
- @Override
- protected void doInit() {
- initializeServer();
- }
-
- @Override
- protected void doStart() throws Exception {
- startServer();
- }
- });
+ camelContext.addService(new MyVertxPlatformHttpServer(configuration));
} catch (Exception e) {
throw new RuntimeException(e);
}
@@ -109,4 +99,21 @@ public final class KnativeHttpTestSupport {
camelContext.getRegistry().bind(PlatformHttpConstants.PLATFORM_HTTP_COMPONENT_NAME, component);
}
+
+ private static class MyVertxPlatformHttpServer extends VertxPlatformHttpServer {
+
+ public MyVertxPlatformHttpServer(VertxPlatformHttpServerConfiguration configuration) {
+ super(configuration);
+ }
+
+ @Override
+ protected void doInit() throws Exception {
+ super.initializeServer();
+ }
+
+ @Override
+ protected void doStart() throws Exception {
+ super.startServer();
+ }
+ }
}