You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by pk...@apache.org on 2022/10/17 16:42:22 UTC
[logging-log4j2] branch master updated: Fix KafkaManagerProducerThreadLeakTest
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/master by this push:
new 26e5acb440 Fix KafkaManagerProducerThreadLeakTest
26e5acb440 is described below
commit 26e5acb4401a746be208d99db74dd5a50a0d86f9
Author: Piotr P. Karwasz <pi...@karwasz.org>
AuthorDate: Mon Oct 17 18:41:45 2022 +0200
Fix KafkaManagerProducerThreadLeakTest
---
.../KafkaManagerProducerThreadLeakTest.java | 2 +-
.../KafkaManagerProducerThreadLeakTest.xml | 31 ++++++++++++++++++++++
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/log4j-kafka/src/test/java/org/apache/logging/log4j/kafka/appender/KafkaManagerProducerThreadLeakTest.java b/log4j-kafka/src/test/java/org/apache/logging/log4j/kafka/appender/KafkaManagerProducerThreadLeakTest.java
index df2ecadc2f..dc63ece6f2 100644
--- a/log4j-kafka/src/test/java/org/apache/logging/log4j/kafka/appender/KafkaManagerProducerThreadLeakTest.java
+++ b/log4j-kafka/src/test/java/org/apache/logging/log4j/kafka/appender/KafkaManagerProducerThreadLeakTest.java
@@ -31,7 +31,7 @@ import static org.junit.Assert.assertEquals;
* @see <a href="https://issues.apache.org/jira/browse/LOG4J2-2916">LOG4J2-2916</a>
*/
@Category(Appenders.Kafka.class)
-@LoggerContextSource("KafkaAppenderTest.xml")
+@LoggerContextSource("KafkaManagerProducerThreadLeakTest.xml")
class KafkaManagerProducerThreadLeakTest {
@Test
diff --git a/log4j-kafka/src/test/resources/KafkaManagerProducerThreadLeakTest.xml b/log4j-kafka/src/test/resources/KafkaManagerProducerThreadLeakTest.xml
new file mode 100644
index 0000000000..09ca852ef0
--- /dev/null
+++ b/log4j-kafka/src/test/resources/KafkaManagerProducerThreadLeakTest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+<Configuration name="KafkaManagerProducerThreadLeakTest" status="OFF">
+ <Appenders>
+ <Kafka name="KafkaAppender" topic="kafka-topic">
+ <PatternLayout pattern="[%m]"/>
+ <Property name="bootstrap.servers">localhost:9092</Property>
+ <Property name="timeout.ms">1000</Property>
+ </Kafka>
+ </Appenders>
+ <Loggers>
+ <Root level="info">
+ <AppenderRef ref="KafkaAppender"/>
+ </Root>
+ </Loggers>
+</Configuration>