This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 0a8d73fd76efdd9bc2d4f544f9dcb1fddacdcd1f Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Mon Mar 13 14:34:43 2023 +0100 Upgrade Jnats to version 2.16.8 Signed-off-by: Andrea Cosentino <anco...@gmail.com> --- .../component/nats/integration/NatsTLSIT.java | 75 ---------------------- .../src/test/resources/log4j2.properties | 2 +- 2 files changed, 1 insertion(+), 76 deletions(-) diff --git a/components/camel-nats/src/test/java/org/apache/camel/component/nats/integration/NatsTLSIT.java b/components/camel-nats/src/test/java/org/apache/camel/component/nats/integration/NatsTLSIT.java deleted file mode 100644 index 566aadc98a0..00000000000 --- a/components/camel-nats/src/test/java/org/apache/camel/component/nats/integration/NatsTLSIT.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.nats.integration; - -import org.apache.camel.BindToRegistry; -import org.apache.camel.EndpointInject; -import org.apache.camel.builder.RouteBuilder; -import org.apache.camel.component.mock.MockEndpoint; -import org.apache.camel.support.jsse.KeyManagersParameters; -import org.apache.camel.support.jsse.KeyStoreParameters; -import org.apache.camel.support.jsse.SSLContextParameters; -import org.apache.camel.support.jsse.TrustManagersParameters; -import org.junit.jupiter.api.Test; - -public class NatsTLSIT extends NatsTLSAuthITSupport { - - @BindToRegistry("ssl") - SSLContextParameters ssl = createSSLContextParameters(); - - @EndpointInject("mock:received") - MockEndpoint mockReceived; - - @Test - public void sendReceiveNatsRoundTripShouldSucceed() throws Exception { - mockReceived.expectedBodiesReceived("pippo"); - template.requestBody("direct:send", "pippo"); - mockReceived.assertIsSatisfied(); - } - - private SSLContextParameters createSSLContextParameters() { - SSLContextParameters sslContextParameters = new SSLContextParameters(); - - KeyManagersParameters keyManagersParameters = new KeyManagersParameters(); - KeyStoreParameters keyStore = new KeyStoreParameters(); - keyStore.setPassword("password"); - keyStore.setResource("org/apache/camel/component/nats/keystore.jks"); - keyManagersParameters.setKeyPassword("password"); - keyManagersParameters.setKeyStore(keyStore); - sslContextParameters.setKeyManagers(keyManagersParameters); - - TrustManagersParameters trustManagersParameters = new TrustManagersParameters(); - KeyStoreParameters trustStore = new KeyStoreParameters(); - trustStore.setPassword("password"); - trustStore.setResource("org/apache/camel/component/nats/truststore.jks"); - trustManagersParameters.setKeyStore(trustStore); - sslContextParameters.setTrustManagers(trustManagersParameters); - - return sslContextParameters; - } - - @Override - protected RouteBuilder createRouteBuilder() { - return new RouteBuilder() { - @Override - public void configure() { - from("direct:send").to("nats:test?sslContextParameters=#ssl&secure=true"); - from("nats:test?sslContextParameters=#ssl&secure=true").to("mock:received"); - } - }; - } -} diff --git a/components/camel-nats/src/test/resources/log4j2.properties b/components/camel-nats/src/test/resources/log4j2.properties index f71156af335..b24397570a4 100644 --- a/components/camel-nats/src/test/resources/log4j2.properties +++ b/components/camel-nats/src/test/resources/log4j2.properties @@ -24,5 +24,5 @@ appender.out.type = Console appender.out.name = out appender.out.layout.type = PatternLayout appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n -rootLogger.level = INFO +rootLogger.level = DEBUG rootLogger.appenderRef.file.ref = file