|
|
@ -28,6 +28,11 @@ import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactor
|
|
|
|
|
|
|
|
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Tests for {@link LettuceMetricsAutoConfiguration}.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @author Antonin Arquey
|
|
|
|
|
|
|
|
*/
|
|
|
|
class LettuceMetricsAutoConfigurationTests {
|
|
|
|
class LettuceMetricsAutoConfigurationTests {
|
|
|
|
|
|
|
|
|
|
|
|
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
|
|
|
|
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
|
|
|
@ -39,7 +44,7 @@ class LettuceMetricsAutoConfigurationTests {
|
|
|
|
.withConfiguration(AutoConfigurations.of(RedisAutoConfiguration.class)).run((context) -> {
|
|
|
|
.withConfiguration(AutoConfigurations.of(RedisAutoConfiguration.class)).run((context) -> {
|
|
|
|
ClientResources clientResources = context.getBean(LettuceConnectionFactory.class)
|
|
|
|
ClientResources clientResources = context.getBean(LettuceConnectionFactory.class)
|
|
|
|
.getClientResources();
|
|
|
|
.getClientResources();
|
|
|
|
assertThat(clientResources.commandLatencyRecorder()).isNotNull()
|
|
|
|
assertThat(clientResources.commandLatencyRecorder())
|
|
|
|
.isInstanceOf(MicrometerCommandLatencyRecorder.class);
|
|
|
|
.isInstanceOf(MicrometerCommandLatencyRecorder.class);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|