Browse Source

Fix log4j-appender-2.17 latest dep tests (#9915)

Lauri Tulmin 1 year ago
parent
commit
cafbcfc198

+ 3 - 2
instrumentation/log4j/log4j-appender-2.17/javaagent/build.gradle.kts

@@ -22,9 +22,10 @@ dependencies {
 
   testImplementation("org.awaitility:awaitility")
 
-  // this dependency is needed for the slf4j->log4j test
   if (testLatestDeps) {
-    testImplementation("org.apache.logging.log4j:log4j-slf4j2-impl:2.19.0")
+    // this dependency is needed for the slf4j->log4j test
+    testImplementation("org.apache.logging.log4j:log4j-slf4j2-impl:+")
+    testCompileOnly("biz.aQute.bnd:biz.aQute.bnd.annotation:7.0.0")
   } else {
     // log4j 2.17 doesn't have an slf4j2 bridge
     testImplementation("org.apache.logging.log4j:log4j-slf4j-impl:2.17.0")

+ 4 - 0
instrumentation/log4j/log4j-appender-2.17/library/build.gradle.kts

@@ -6,4 +6,8 @@ dependencies {
   library("org.apache.logging.log4j:log4j-core:2.17.0")
 
   testImplementation("io.opentelemetry:opentelemetry-sdk-testing")
+
+  if (findProperty("testLatestDeps") as Boolean) {
+    testCompileOnly("biz.aQute.bnd:biz.aQute.bnd.annotation:7.0.0")
+  }
 }