diff --git a/caffeine-bounded-cache-support/pom.xml b/caffeine-bounded-cache-support/pom.xml
index e58de8506f..9a56ad1b22 100644
--- a/caffeine-bounded-cache-support/pom.xml
+++ b/caffeine-bounded-cache-support/pom.xml
@@ -44,14 +44,13 @@
org.apache.logging.log4j
- log4j-slf4j-impl
+ log4j-slf4j2-impl
test
org.apache.logging.log4j
log4j-core
${log4j.version}
- test-jar
test
diff --git a/operator-framework-core/pom.xml b/operator-framework-core/pom.xml
index 35ff0359cf..a2b045a0ba 100644
--- a/operator-framework-core/pom.xml
+++ b/operator-framework-core/pom.xml
@@ -81,14 +81,13 @@
org.apache.logging.log4j
- log4j-slf4j-impl
+ log4j-slf4j2-impl
test
org.apache.logging.log4j
log4j-core
${log4j.version}
- test-jar
test
diff --git a/operator-framework/pom.xml b/operator-framework/pom.xml
index cd1ff4d9e2..789b637081 100644
--- a/operator-framework/pom.xml
+++ b/operator-framework/pom.xml
@@ -72,14 +72,13 @@
org.apache.logging.log4j
- log4j-slf4j-impl
+ log4j-slf4j2-impl
test
org.apache.logging.log4j
log4j-core
${log4j.version}
- test-jar
test
diff --git a/operator-framework/src/test/java/io/javaoperatorsdk/operator/config/runtime/DefaultConfigurationServiceTest.java b/operator-framework/src/test/java/io/javaoperatorsdk/operator/config/runtime/DefaultConfigurationServiceTest.java
index c5bf845853..fc3c94ab6d 100644
--- a/operator-framework/src/test/java/io/javaoperatorsdk/operator/config/runtime/DefaultConfigurationServiceTest.java
+++ b/operator-framework/src/test/java/io/javaoperatorsdk/operator/config/runtime/DefaultConfigurationServiceTest.java
@@ -1,11 +1,5 @@
package io.javaoperatorsdk.operator.config.runtime;
-import org.apache.logging.log4j.Level;
-import org.apache.logging.log4j.core.LoggerContext;
-import org.apache.logging.log4j.core.config.AppenderRef;
-import org.apache.logging.log4j.core.config.LoggerConfig;
-import org.apache.logging.log4j.core.layout.PatternLayout;
-import org.apache.logging.log4j.test.appender.ListAppender;
import org.junit.jupiter.api.Test;
import io.fabric8.kubernetes.client.CustomResource;
@@ -17,60 +11,13 @@
import io.javaoperatorsdk.operator.api.reconciler.Reconciler;
import io.javaoperatorsdk.operator.api.reconciler.UpdateControl;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.*;
class DefaultConfigurationServiceTest {
public static final String CUSTOM_FINALIZER_NAME = "a.custom/finalizer";
final DefaultConfigurationService configurationService = DefaultConfigurationService.instance();
- @Test
- void attemptingToRetrieveAnUnknownControllerShouldLogWarning() {
- final LoggerContext context = LoggerContext.getContext(false);
- final PatternLayout layout = PatternLayout.createDefaultLayout(context.getConfiguration());
- final ListAppender appender = new ListAppender("list", null, layout, false, false);
-
- appender.start();
-
- context.getConfiguration().addAppender(appender);
-
- AppenderRef ref = AppenderRef.createAppenderRef("list", null, null);
- final var loggerName = configurationService.getLoggerName();
- LoggerConfig loggerConfig =
- LoggerConfig.createLogger(
- false,
- Level.valueOf("info"),
- loggerName,
- "false",
- new AppenderRef[] {ref},
- null,
- context.getConfiguration(),
- null);
- loggerConfig.addAppender(appender, null, null);
-
- context.getConfiguration().addLogger(loggerName, loggerConfig);
- context.updateLoggers();
-
- try {
- final var config =
- configurationService
- .getConfigurationFor(new NotAutomaticallyCreated(), false);
-
- assertThat(config).isNull();
- assertThat(appender.getMessages())
- .hasSize(1)
- .allMatch(m -> m.contains(NotAutomaticallyCreated.NAME) && m.contains("not found"));
- } finally {
- appender.stop();
-
- context.getConfiguration().removeLogger(loggerName);
- context.updateLoggers();
- }
- }
-
@Test
void returnsValuesFromControllerAnnotationFinalizer() {
final var reconciler = new TestCustomReconciler();
diff --git a/pom.xml b/pom.xml
index 4990a9b7eb..1071f95737 100644
--- a/pom.xml
+++ b/pom.xml
@@ -46,7 +46,7 @@
5.9.1
6.5.1
1.7.36
- 2.19.0
+ 2.20.0
5.3.0
3.12.0
0.19
@@ -159,12 +159,12 @@
org.apache.logging.log4j
- log4j-slf4j-impl
+ log4j-slf4j2-impl
${log4j.version}
org.apache.logging.log4j
- log4j-core
+ log4j2-core
${log4j.version}
diff --git a/sample-operators/leader-election/pom.xml b/sample-operators/leader-election/pom.xml
index d43ee0a331..e7c8cbc45f 100644
--- a/sample-operators/leader-election/pom.xml
+++ b/sample-operators/leader-election/pom.xml
@@ -40,7 +40,7 @@
org.apache.logging.log4j
- log4j-slf4j-impl
+ log4j-slf4j2-impl
org.takes
diff --git a/sample-operators/mysql-schema/pom.xml b/sample-operators/mysql-schema/pom.xml
index 4dcc9e247e..0f5b0288eb 100644
--- a/sample-operators/mysql-schema/pom.xml
+++ b/sample-operators/mysql-schema/pom.xml
@@ -59,7 +59,7 @@
org.apache.logging.log4j
- log4j-slf4j-impl
+ log4j-slf4j2-impl
org.junit.jupiter
diff --git a/sample-operators/tomcat-operator/pom.xml b/sample-operators/tomcat-operator/pom.xml
index 9a97aaaae4..56074efbca 100644
--- a/sample-operators/tomcat-operator/pom.xml
+++ b/sample-operators/tomcat-operator/pom.xml
@@ -55,7 +55,7 @@
org.apache.logging.log4j
- log4j-slf4j-impl
+ log4j-slf4j2-impl
org.takes
diff --git a/sample-operators/webpage/pom.xml b/sample-operators/webpage/pom.xml
index 166e7c4fbf..986ad6a9fd 100644
--- a/sample-operators/webpage/pom.xml
+++ b/sample-operators/webpage/pom.xml
@@ -40,7 +40,7 @@
org.apache.logging.log4j
- log4j-slf4j-impl
+ log4j-slf4j2-impl
org.takes