Skip to content

Commit 9052ca9

Browse files
authored
Fix lettuce testLatestDep failures (open-telemetry#13976)
1 parent 9cda87e commit 9052ca9

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

instrumentation/lettuce/lettuce-5.1/javaagent/build.gradle.kts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,17 @@ dependencies {
2525

2626
tasks {
2727
withType<Test>().configureEach {
28-
systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
28+
val testLatestDeps = findProperty("testLatestDeps") as Boolean
29+
systemProperty("testLatestDeps", testLatestDeps)
2930
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
31+
32+
dependencies {
33+
if (testLatestDeps) {
34+
// This is only needed for 6.7.0, can be removed when 6.7.1 is released.
35+
// See https://github.com/redis/lettuce/issues/3317
36+
testLibrary("io.micrometer:micrometer-core:1.5.0")
37+
}
38+
}
3039
}
3140

3241
val testStableSemconv by registering(Test::class) {

instrumentation/lettuce/lettuce-5.1/library/build.gradle.kts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,17 @@ dependencies {
1414

1515
tasks {
1616
withType<Test>().configureEach {
17-
systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
17+
val testLatestDeps = findProperty("testLatestDeps") as Boolean
18+
systemProperty("testLatestDeps", testLatestDeps)
1819
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
20+
21+
dependencies {
22+
if (testLatestDeps) {
23+
// This is only needed for 6.7.0, can be removed when 6.7.1 is released.
24+
// See https://github.com/redis/lettuce/issues/3317
25+
testLibrary("io.micrometer:micrometer-core:1.5.0")
26+
}
27+
}
1928
}
2029

2130
val testStableSemconv by registering(Test::class) {

0 commit comments

Comments
 (0)