
helper.metrics.aws.micrometer-metric-publisherTest.mustache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scaffold-clean-architecture Show documentation
Show all versions of scaffold-clean-architecture Show documentation
Gradle plugin to create a clean application in Java that already works, It follows our best practices!
package {{package}}.metrics.aws;
import io.micrometer.core.instrument.logging.LoggingMeterRegistry;
import io.micrometer.core.instrument.logging.LoggingRegistryConfig;
import org.junit.jupiter.api.Test;
import software.amazon.awssdk.metrics.internal.EmptyMetricCollection;
import static org.junit.jupiter.api.Assertions.assertNotNull;
public class MicrometerMetricPublisherTest {
@Test
void metricTest() {
LoggingMeterRegistry loggingMeterRegistry = LoggingMeterRegistry
.builder(LoggingRegistryConfig.DEFAULT)
.build();
MicrometerMetricPublisher micrometerMetricPublisher = new MicrometerMetricPublisher(loggingMeterRegistry);
micrometerMetricPublisher.publish(EmptyMetricCollection.create());
micrometerMetricPublisher.close();
assertNotNull(micrometerMetricPublisher);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy