Start building against Micrometer 1.13.0 snapshots
See gh-39889
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -18,7 +18,6 @@ package org.springframework.boot.test.autoconfigure.actuate.observability;
|
||||
|
||||
import io.micrometer.core.instrument.MeterRegistry;
|
||||
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
|
||||
import io.micrometer.prometheus.PrometheusMeterRegistry;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -37,13 +36,14 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @author Moritz Halbritter
|
||||
*/
|
||||
@SpringBootTest
|
||||
@SuppressWarnings("deprecation")
|
||||
class AutoConfigureObservabilityMissingIntegrationTests {
|
||||
|
||||
@Test
|
||||
void customizerRunsAndOnlyEnablesSimpleMeterRegistryWhenNoAnnotationPresent(
|
||||
@Autowired ApplicationContext applicationContext) {
|
||||
assertThat(applicationContext.getBean(MeterRegistry.class)).isInstanceOf(SimpleMeterRegistry.class);
|
||||
assertThat(applicationContext.getBeansOfType(PrometheusMeterRegistry.class)).isEmpty();
|
||||
assertThat(applicationContext.getBeansOfType(io.micrometer.prometheus.PrometheusMeterRegistry.class)).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.springframework.boot.test.autoconfigure.actuate.observability;
|
||||
|
||||
import io.micrometer.prometheus.PrometheusMeterRegistry;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -36,12 +35,14 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
@SpringBootTest
|
||||
@AutoConfigureObservability
|
||||
@SuppressWarnings("deprecation")
|
||||
class AutoConfigureObservabilityPresentIntegrationTests {
|
||||
|
||||
@Test
|
||||
void customizerDoesNotDisableAvailableMeterRegistriesWhenAnnotationPresent(
|
||||
@Autowired ApplicationContext applicationContext) {
|
||||
assertThat(applicationContext.getBeansOfType(PrometheusMeterRegistry.class)).hasSize(1);
|
||||
assertThat(applicationContext.getBeansOfType(io.micrometer.prometheus.PrometheusMeterRegistry.class))
|
||||
.hasSize(1);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user