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 2020/11/13 14:29:22 UTC
[camel-quarkus] 04/04: nats: Raised the TLS handshake timeout to
fix builds when O/S is under pressure #1978
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch camel-master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 7b0fd8a660555c1994440aade21961deac1eb47d
Author: aldettinger <al...@gmail.com>
AuthorDate: Thu Nov 12 16:03:39 2020 +0100
nats: Raised the TLS handshake timeout to fix builds when O/S is under pressure #1978
---
.../component/nats/it/NatsTestResource.java | 7 +++--
.../nats/src/test/resources/conf/tls.conf | 32 ++++++++++++++++++++++
pom.xml | 1 +
3 files changed, 38 insertions(+), 2 deletions(-)
diff --git a/integration-tests/nats/src/test/java/org/apache/camel/quarkus/component/nats/it/NatsTestResource.java b/integration-tests/nats/src/test/java/org/apache/camel/quarkus/component/nats/it/NatsTestResource.java
index ea1fe34..829bd01 100644
--- a/integration-tests/nats/src/test/java/org/apache/camel/quarkus/component/nats/it/NatsTestResource.java
+++ b/integration-tests/nats/src/test/java/org/apache/camel/quarkus/component/nats/it/NatsTestResource.java
@@ -38,7 +38,7 @@ public class NatsTestResource implements ContainerResourceLifecycleManager {
private static final Logger LOG = LoggerFactory.getLogger(NatsTestResource.class);
private static final String BASIC_AUTH_USERNAME = "admin";
private static final String BASIC_AUTH_PASSWORD = "password";
- private static final String NATS_IMAGE = "nats:2.1.4";
+ private static final String NATS_IMAGE = "nats:2.1.9";
private static final int NATS_SERVER_PORT = 4222;
private static final String TOKEN_AUTH_TOKEN = "!admin23456";
@@ -71,7 +71,10 @@ public class NatsTestResource implements ContainerResourceLifecycleManager {
// Start the container needed for the TLS authentication test
tlsAuthContainer = new GenericContainer(NATS_IMAGE).withExposedPorts(NATS_SERVER_PORT)
.withClasspathResourceMapping("certs", "/certs", BindMode.READ_ONLY)
- .withCommand("--tls",
+ .withClasspathResourceMapping("conf", "/conf", BindMode.READ_ONLY)
+ .withCommand(
+ "--config", "/conf/tls.conf",
+ "--tls",
"--tlscert=/certs/server.pem",
"--tlskey=/certs/key.pem",
"--tlsverify",
diff --git a/integration-tests/nats/src/test/resources/conf/tls.conf b/integration-tests/nats/src/test/resources/conf/tls.conf
new file mode 100644
index 0000000..3e0914b
--- /dev/null
+++ b/integration-tests/nats/src/test/resources/conf/tls.conf
@@ -0,0 +1,32 @@
+# Client port of 4222 on all interfaces
+port: 4222
+
+# HTTP monitoring port
+monitor_port: 8222
+
+tls {
+ # TLS handshake timeout in fractional seconds. Default set to 0.5 seconds.
+ # This value has been raised up to 1.5s in order to avoid TLS handshake error on build servers
+ timeout: 1.5
+}
+
+# This is for clustering multiple servers together.
+cluster {
+
+ # Route connections to be received on any interface on port 6222
+ port: 6222
+
+ # Routes are protected, so need to use them with --routes flag
+ # e.g. --routes=nats-route://ruser:T0pS3cr3t@otherdockerhost:6222
+ authorization {
+ user: ruser
+ password: T0pS3cr3t
+ timeout: 6
+ }
+
+ # Routes are actively solicited and connected to from this server.
+ # This Docker image has none by default, but you can pass a
+ # flag to the gnatsd docker image to create one to an existing server.
+ routes = []
+
+}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 40cc252..dab33ab 100644
--- a/pom.xml
+++ b/pom.xml
@@ -417,6 +417,7 @@
<exclude>**/*.avsc</exclude>
<exclude>**/*.bin</exclude>
<exclude>**/*.cnf</exclude>
+ <exclude>**/*.conf</exclude>
<exclude>**/*.csv</exclude>
<exclude>**/*.ftl</exclude>
<exclude>**/*.graphql</exclude>