Commit c823f44e authored by izeye's avatar izeye Committed by Stephane Nicoll

Polish

See gh-25451
parent c35a4cc2
...@@ -76,7 +76,7 @@ public class KafkaMetricsAutoConfiguration { ...@@ -76,7 +76,7 @@ public class KafkaMetricsAutoConfiguration {
static class KafkaStreamsMetricsConfiguration { static class KafkaStreamsMetricsConfiguration {
@Bean @Bean
StreamsBuilderFactoryBeanCustomizer kafkaStreamsProducerMetrics(MeterRegistry meterRegistry) { StreamsBuilderFactoryBeanCustomizer kafkaStreamsMetrics(MeterRegistry meterRegistry) {
return (factoryBean) -> factoryBean.addListener(new KafkaStreamsMicrometerListener(meterRegistry)); return (factoryBean) -> factoryBean.addListener(new KafkaStreamsMicrometerListener(meterRegistry));
} }
......
...@@ -50,7 +50,7 @@ class ConditionalOnEnabledMetricsExportAutoConfigurationTests { ...@@ -50,7 +50,7 @@ class ConditionalOnEnabledMetricsExportAutoConfigurationTests {
} }
@Test @Test
void exporterCanBeGloballyDisabledWitSpecificOverride() { void exporterCanBeGloballyDisabledWithSpecificOverride() {
this.contextRunner this.contextRunner
.withPropertyValues("management.metrics.export.defaults.enabled=false", .withPropertyValues("management.metrics.export.defaults.enabled=false",
"management.metrics.export.simple.enabled=true") "management.metrics.export.simple.enabled=true")
......
...@@ -42,24 +42,24 @@ class InfluxDbHealthIndicatorTests { ...@@ -42,24 +42,24 @@ class InfluxDbHealthIndicatorTests {
void influxDbIsUp() { void influxDbIsUp() {
Pong pong = mock(Pong.class); Pong pong = mock(Pong.class);
given(pong.getVersion()).willReturn("0.9"); given(pong.getVersion()).willReturn("0.9");
InfluxDB influxDB = mock(InfluxDB.class); InfluxDB influxDb = mock(InfluxDB.class);
given(influxDB.ping()).willReturn(pong); given(influxDb.ping()).willReturn(pong);
InfluxDbHealthIndicator healthIndicator = new InfluxDbHealthIndicator(influxDB); InfluxDbHealthIndicator healthIndicator = new InfluxDbHealthIndicator(influxDb);
Health health = healthIndicator.health(); Health health = healthIndicator.health();
assertThat(health.getStatus()).isEqualTo(Status.UP); assertThat(health.getStatus()).isEqualTo(Status.UP);
assertThat(health.getDetails().get("version")).isEqualTo("0.9"); assertThat(health.getDetails().get("version")).isEqualTo("0.9");
verify(influxDB).ping(); verify(influxDb).ping();
} }
@Test @Test
void influxDbIsDown() { void influxDbIsDown() {
InfluxDB influxDB = mock(InfluxDB.class); InfluxDB influxDb = mock(InfluxDB.class);
given(influxDB.ping()).willThrow(new InfluxDBException(new IOException("Connection failed"))); given(influxDb.ping()).willThrow(new InfluxDBException(new IOException("Connection failed")));
InfluxDbHealthIndicator healthIndicator = new InfluxDbHealthIndicator(influxDB); InfluxDbHealthIndicator healthIndicator = new InfluxDbHealthIndicator(influxDb);
Health health = healthIndicator.health(); Health health = healthIndicator.health();
assertThat(health.getStatus()).isEqualTo(Status.DOWN); assertThat(health.getStatus()).isEqualTo(Status.DOWN);
assertThat((String) health.getDetails().get("error")).contains("Connection failed"); assertThat((String) health.getDetails().get("error")).contains("Connection failed");
verify(influxDB).ping(); verify(influxDb).ping();
} }
} }
...@@ -30,8 +30,8 @@ public interface InfluxDbCustomizer { ...@@ -30,8 +30,8 @@ public interface InfluxDbCustomizer {
/** /**
* Customize the {@link InfluxDB}. * Customize the {@link InfluxDB}.
* @param influxDB the influxDB instance to customize * @param influxDb the InfluxDB instance to customize
*/ */
void customize(InfluxDB influxDB); void customize(InfluxDB influxDb);
} }
...@@ -87,8 +87,8 @@ class InfluxDbAutoConfigurationTests { ...@@ -87,8 +87,8 @@ class InfluxDbAutoConfigurationTests {
} }
private int getReadTimeoutProperty(AssertableApplicationContext context) { private int getReadTimeoutProperty(AssertableApplicationContext context) {
InfluxDB influxDB = context.getBean(InfluxDB.class); InfluxDB influxDb = context.getBean(InfluxDB.class);
Retrofit retrofit = (Retrofit) ReflectionTestUtils.getField(influxDB, "retrofit"); Retrofit retrofit = (Retrofit) ReflectionTestUtils.getField(influxDb, "retrofit");
OkHttpClient callFactory = (OkHttpClient) retrofit.callFactory(); OkHttpClient callFactory = (OkHttpClient) retrofit.callFactory();
return callFactory.readTimeoutMillis(); return callFactory.readTimeoutMillis();
} }
......
...@@ -2349,7 +2349,7 @@ The sensitive portion of the URI is identified using the format `<scheme>://<use ...@@ -2349,7 +2349,7 @@ The sensitive portion of the URI is identified using the format `<scheme>://<use
For example, for the property `myclient.uri=http://user1:password1@localhost:8081`, the resulting sanitized value is For example, for the property `myclient.uri=http://user1:password1@localhost:8081`, the resulting sanitized value is
`++http://user1:******@localhost:8081++`. `++http://user1:******@localhost:8081++`.
The defaults patterns used by the `env` and `configprops` endpoints can be replaced using configprop:management.endpoint.env.keys-to-sanitize[] and configprop:management.endpoint.configprops.keys-to-sanitize[] respectively. The default patterns used by the `env` and `configprops` endpoints can be replaced using configprop:management.endpoint.env.keys-to-sanitize[] and configprop:management.endpoint.configprops.keys-to-sanitize[] respectively.
Alternatively, additional patterns can be configured using configprop:management.endpoint.env.additional-keys-to-sanitize[] and configprop:management.endpoint.configprops.additional-keys-to-sanitize[]. Alternatively, additional patterns can be configured using configprop:management.endpoint.env.additional-keys-to-sanitize[] and configprop:management.endpoint.configprops.additional-keys-to-sanitize[].
......
...@@ -4929,7 +4929,7 @@ If the connection to InfluxDB requires a user and password, you can set the `spr ...@@ -4929,7 +4929,7 @@ If the connection to InfluxDB requires a user and password, you can set the `spr
InfluxDB relies on OkHttp. InfluxDB relies on OkHttp.
If you need to tune the http client `InfluxDB` uses behind the scenes, you can register an `InfluxDbOkHttpClientBuilderProvider` bean. If you need to tune the http client `InfluxDB` uses behind the scenes, you can register an `InfluxDbOkHttpClientBuilderProvider` bean.
If you need more control over the configuration, consider registering a `InfluxDbCustomizer` bean. If you need more control over the configuration, consider registering an `InfluxDbCustomizer` bean.
...@@ -6255,7 +6255,7 @@ The thread pool uses one thread by default and its settings can be fine-tuned us ...@@ -6255,7 +6255,7 @@ The thread pool uses one thread by default and its settings can be fine-tuned us
spring: spring:
task: task:
scheduling: scheduling:
thread-name-prefix: "scheduling-" thread-name-prefix: "scheduling-"
pool: pool:
size: 2 size: 2
---- ----
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment