Skip to content

Commit 0061864

Browse files
committed
fix test
1 parent ad052db commit 0061864

File tree

1 file changed

+12
-7
lines changed
  • instrumentation/spring/spring-boot-actuator-autoconfigure-2.0/javaagent

1 file changed

+12
-7
lines changed

instrumentation/spring/spring-boot-actuator-autoconfigure-2.0/javaagent/build.gradle.kts

+12-7
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,19 @@ if (!latestDepTest) {
5050
}
5151
}
5252

53-
tasks {
54-
val testPrometheus by registering(Test::class) {
55-
dependencies {
56-
runtimeOnly("io.micrometer:micrometer-registry-prometheus:1.14.3")
53+
if (latestDepTest) {
54+
// this dependency adds the new io.micrometer.prometheusmetrics.PrometheusMeterRegistry,
55+
// not the old io.micrometer.prometheus.PrometheusMeterRegistry,
56+
// which is required in older versions of spring that we use in this test project
57+
tasks {
58+
val testPrometheus by registering(Test::class) {
59+
dependencies {
60+
runtimeOnly("io.micrometer:micrometer-registry-prometheus:1.14.3")
61+
}
5762
}
58-
}
5963

60-
check {
61-
dependsOn(testPrometheus)
64+
check {
65+
dependsOn(testPrometheus)
66+
}
6267
}
6368
}

0 commit comments

Comments
 (0)