Skip to content

Commit 1969651

Browse files
committed
Merge branch '1.13.x' into 1.14.x
2 parents 0867c60 + bd90d13 commit 1969651

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

gradle/libs.versions.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ maven-resolver = "1.9.22"
6363
mockito4 = "4.11.0"
6464
mockito5 = "5.11.0"
6565
mongo = "4.11.4"
66-
netty = "4.1.114.Final"
66+
netty = "4.1.115.Final"
6767
newrelic-api = "5.14.0"
6868
# Kotlin 1.7 sample will fail from OkHttp 4.12.0 due to okio dependency being a Kotlin 1.9 module
6969
okhttp = "4.11.0"

implementations/micrometer-registry-prometheus/build.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ dependencies {
1818
testImplementation 'org.testcontainers:junit-jupiter'
1919
testImplementation 'org.awaitility:awaitility'
2020
}
21+
22+
dockerTest {
23+
systemProperty 'prometheus.version', 'v2.55.1'
24+
}

implementations/micrometer-registry-prometheus/src/test/java/io/micrometer/prometheusmetrics/PrometheusMeterRegistryIntegrationTest.java

+11-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
class PrometheusMeterRegistryIntegrationTest {
5858

5959
@Container
60-
static GenericContainer<?> prometheus = new GenericContainer<>(DockerImageName.parse("prom/prometheus:latest"))
60+
static GenericContainer<?> prometheus = new GenericContainer<>(
61+
DockerImageName.parse("prom/prometheus:" + getPrometheusImageVersion()))
6162
.withCommand("--config.file=/etc/prometheus/prometheus.yml")
6263
.withClasspathResourceMapping("prometheus.yml", "/etc/prometheus/prometheus.yml", READ_ONLY)
6364
.waitingFor(Wait.forLogMessage(".*Server is ready to receive web requests.*", 1))
@@ -72,6 +73,15 @@ class PrometheusMeterRegistryIntegrationTest {
7273
@Nullable
7374
private HttpServer prometheusTextServer;
7475

76+
private static String getPrometheusImageVersion() {
77+
String version = System.getProperty("prometheus.version");
78+
if (version == null) {
79+
throw new IllegalStateException(
80+
"System property 'prometheus.version' is not set. This should be set in the build configuration for running from the command line. If you are running PrometheusMeterRegistryIntegrationTest from an IDE, set the system property to the desired prom/prometheus image version.");
81+
}
82+
return version;
83+
}
84+
7585
@BeforeEach
7686
void setUp() {
7787
org.testcontainers.Testcontainers.exposeHostPorts(12345, 12346);

0 commit comments

Comments
 (0)