From eb61f0e25330b2c2a34d543e63e59f6be95de859 Mon Sep 17 00:00:00 2001 From: David Byron <82477955+dbyron-sf@users.noreply.github.com> Date: Wed, 28 Aug 2024 08:02:07 -0700 Subject: [PATCH] chore(keiko-redis): test logging cleanups (#4775) * chore(keiko-redis/test): add slf4j binding to keiko-redis tests so test output contains log messages and to avoid these error messages: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. SLF4J: Failed to load class "org.slf4j.impl.StaticMDCBinder". SLF4J: Defaulting to no-operation MDCAdapter implementation. SLF4J: See http://www.slf4j.org/codes.html#no_static_mdc_binder for further details. * chore(keiko-redis-spring/test): add slf4j binding to keiko-redis-spring tests so test output contains log messages and to avoid these error messages: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. * chore(keiko-redis/test): tone down testcontainers logging since it's super verbose by default --- keiko-redis-spring/keiko-redis-spring.gradle | 1 + keiko-redis/keiko-redis.gradle | 1 + keiko-redis/src/test/resources/logback.xml | 36 ++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 keiko-redis/src/test/resources/logback.xml diff --git a/keiko-redis-spring/keiko-redis-spring.gradle b/keiko-redis-spring/keiko-redis-spring.gradle index 5515c3ccdb..cb6a57f96d 100644 --- a/keiko-redis-spring/keiko-redis-spring.gradle +++ b/keiko-redis-spring/keiko-redis-spring.gradle @@ -11,5 +11,6 @@ dependencies { testImplementation "org.assertj:assertj-core" testImplementation("io.spinnaker.kork:kork-jedis-test") + testRuntimeOnly "ch.qos.logback:logback-classic" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine" } diff --git a/keiko-redis/keiko-redis.gradle b/keiko-redis/keiko-redis.gradle index b2bf3a24e5..86185e2d09 100644 --- a/keiko-redis/keiko-redis.gradle +++ b/keiko-redis/keiko-redis.gradle @@ -11,4 +11,5 @@ dependencies { testImplementation project(":keiko-tck") testImplementation "io.spinnaker.kork:kork-jedis-test" + testRuntimeOnly "ch.qos.logback:logback-classic" } diff --git a/keiko-redis/src/test/resources/logback.xml b/keiko-redis/src/test/resources/logback.xml new file mode 100644 index 0000000000..6145d38780 --- /dev/null +++ b/keiko-redis/src/test/resources/logback.xml @@ -0,0 +1,36 @@ + + + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + + + + +