Merge pull request #4503 from izeye/polish-20151116

* pr/4503:
  Polishing
pull/4503/merge
Stephane Nicoll 9 years ago
commit 5d8410f694

@ -17,4 +17,4 @@ Example HTTP response:
include::{generated}/health/http-response.adoc[]
Example HTTP response with `endpoints.health.sensitive=false`:
include::{generated}/health/unsensitive/http-response.adoc[]
include::{generated}/health/insensitive/http-response.adoc[]

@ -37,7 +37,7 @@ include::{generated}/logfile/http-response.adoc[]
=== /docs
This endpoint (if available) contains HTML documemtation for the other endpoints. Its path
This endpoint (if available) contains HTML documentation for the other endpoints. Its path
can be "/docs" (if there is an existing home page) or "/" (otherwise, including if the
HAL browser is not active).

@ -64,7 +64,7 @@ public class HealthEndpointDocumentation {
@Test
public void health() throws Exception {
this.mockMvc.perform(get("/health").accept(MediaType.APPLICATION_JSON))
.andExpect(status().isOk()).andDo(document("health/unsensitive"));
.andExpect(status().isOk()).andDo(document("health/insensitive"));
}
}

@ -25,7 +25,7 @@ import org.springframework.boot.actuate.metrics.repository.MultiMetricRepository
/**
* A {@link RichGaugeReader} that works by reading metric values from a
* {@link MultiMetricRepository} where the group name is the RichGauge name. The format
* used matches that in he RichGaugeExporter, so this reader can be used on a store that
* used matches that in the RichGaugeExporter, so this reader can be used on a store that
* has been populated using that exporter.
*
* @author Dave Syer

@ -286,7 +286,7 @@ public class HealthIndicatorAutoConfigurationTests {
}
@Test
public void solrHeathIndicator() {
public void solrHealthIndicator() {
this.context.register(SolrAutoConfiguration.class,
ManagementServerProperties.class, HealthIndicatorAutoConfiguration.class);
EnvironmentTestUtils.addEnvironment(this.context,
@ -300,7 +300,7 @@ public class HealthIndicatorAutoConfigurationTests {
}
@Test
public void notSolrHeathIndicator() {
public void notSolrHealthIndicator() {
this.context.register(SolrAutoConfiguration.class,
ManagementServerProperties.class, HealthIndicatorAutoConfiguration.class);
EnvironmentTestUtils.addEnvironment(this.context,

@ -270,7 +270,7 @@ public class ShellPropertiesTests {
}
@Test
public void testDefaultPasswordAutogeneratedIfUnresolovedPlaceholder() {
public void testDefaultPasswordAutogeneratedIfUnresolvedPlaceholder() {
SimpleAuthenticationProperties security = new SimpleAuthenticationProperties();
RelaxedDataBinder binder = new RelaxedDataBinder(security, "security");
binder.bind(new MutablePropertyValues(Collections

@ -88,10 +88,10 @@ public class EndpointMBeanExporterTests {
this.context = new GenericApplicationContext();
this.context.registerBeanDefinition("endpointMbeanExporter",
new RootBeanDefinition(EndpointMBeanExporter.class));
MutablePropertyValues mvp = new MutablePropertyValues();
mvp.add("enabled", Boolean.FALSE);
MutablePropertyValues mpv = new MutablePropertyValues();
mpv.add("enabled", Boolean.FALSE);
this.context.registerBeanDefinition("endpoint1",
new RootBeanDefinition(TestEndpoint.class, null, mvp));
new RootBeanDefinition(TestEndpoint.class, null, mpv));
this.context.refresh();
MBeanExporter mbeanExporter = this.context.getBean(EndpointMBeanExporter.class);
assertFalse(mbeanExporter.getServer()
@ -103,10 +103,10 @@ public class EndpointMBeanExporterTests {
this.context = new GenericApplicationContext();
this.context.registerBeanDefinition("endpointMbeanExporter",
new RootBeanDefinition(EndpointMBeanExporter.class));
MutablePropertyValues mvp = new MutablePropertyValues();
mvp.add("enabled", Boolean.TRUE);
MutablePropertyValues mpv = new MutablePropertyValues();
mpv.add("enabled", Boolean.TRUE);
this.context.registerBeanDefinition("endpoint1",
new RootBeanDefinition(TestEndpoint.class, null, mvp));
new RootBeanDefinition(TestEndpoint.class, null, mpv));
this.context.refresh();
MBeanExporter mbeanExporter = this.context.getBean(EndpointMBeanExporter.class);
assertTrue(mbeanExporter.getServer()

@ -168,7 +168,7 @@ public class HealthMvcEndpointTests {
}
@Test
public void unsecureAnonymousAccessUnrestricted() {
public void insecureAnonymousAccessUnrestricted() {
this.mvc = new HealthMvcEndpoint(this.endpoint, false);
this.mvc.setEnvironment(this.environment);
given(this.endpoint.invoke())
@ -180,7 +180,7 @@ public class HealthMvcEndpointTests {
}
@Test
public void unsensitiveAnonymousAccessRestricted() {
public void insensitiveAnonymousAccessRestricted() {
this.environment.getPropertySources().addLast(NON_SENSITIVE);
given(this.endpoint.invoke())
.willReturn(new Health.Builder().up().withDetail("foo", "bar").build());
@ -191,7 +191,7 @@ public class HealthMvcEndpointTests {
}
@Test
public void unsecureUnsensitiveAnonymousAccessUnrestricted() {
public void insecureInsensitiveAnonymousAccessUnrestricted() {
this.mvc = new HealthMvcEndpoint(this.endpoint, false);
this.mvc.setEnvironment(this.environment);
this.environment.getPropertySources().addLast(NON_SENSITIVE);

@ -85,8 +85,8 @@ public class MailHealthIndicatorTests {
public static class SuccessTransport extends Transport {
public SuccessTransport(Session session, URLName urlname) {
super(session, urlname);
public SuccessTransport(Session session, URLName urlName) {
super(session, urlName);
}
@Override

@ -72,14 +72,14 @@ public class DropwizardMetricServicesTests {
}
@Test
public void setPredfinedTimer() {
public void setPredefinedTimer() {
this.writer.submit("timer.foo", 200);
this.writer.submit("timer.foo", 300);
assertEquals(2, this.registry.timer("timer.foo").getCount());
}
@Test
public void setPredfinedHistogram() {
public void setPredefinedHistogram() {
this.writer.submit("histogram.foo", 2.1);
this.writer.submit("histogram.foo", 2.3);
assertEquals(2, this.registry.histogram("histogram.foo").getCount());
@ -94,7 +94,7 @@ public class DropwizardMetricServicesTests {
* @throws Exception if an error occurs
*/
@Test
public void testParallism() throws Exception {
public void testParallelism() throws Exception {
List<WriterThread> threads = new ArrayList<WriterThread>();
ThreadGroup group = new ThreadGroup("threads");
for (int i = 0; i < 10; i++) {
@ -139,9 +139,9 @@ public class DropwizardMetricServicesTests {
this.writer.submit("histogram.test.service", this.index);
this.writer.submit("gauge.test.service", this.index);
}
catch (IllegalArgumentException iae) {
catch (IllegalArgumentException ex) {
this.failed = true;
throw iae;
throw ex;
}
}
}

@ -60,7 +60,7 @@ public class OpenTsdbGaugeWriterTests {
}
@Test
public void flushAutomaticlly() {
public void flushAutomatically() {
given(this.restTemplate.postForEntity(anyString(), any(Object.class), anyMap()))
.willReturn(emptyResponse());
this.writer.setBufferSize(0);

@ -90,7 +90,7 @@ public class StatsdMetricWriterTests {
}
@Test
public void perioPrefix() throws Exception {
public void periodPrefix() throws Exception {
this.writer = new StatsdMetricWriter("my.", "localhost", this.port);
this.writer.set(new Metric<Long>("gauge.foo", 3L));
this.server.waitForMessage();

@ -49,7 +49,7 @@ public class DefaultCounterServiceTests {
}
@Test
public void incrementWithExistingNearlyCounter() {
public void incrementWithExistingNearCounter() {
this.service.increment("counter-foo");
verify(this.repository).increment(this.captor.capture());
assertEquals("counter.counter-foo", this.captor.getValue().getName());

@ -92,7 +92,7 @@ public class SecurityPropertiesTests {
}
@Test
public void testDefaultPasswordAutogeneratedIfUnresolovedPlaceholder() {
public void testDefaultPasswordAutogeneratedIfUnresolvedPlaceholder() {
this.binder.bind(new MutablePropertyValues(
Collections.singletonMap("security.user.password", "${ADMIN_PASSWORD}")));
assertFalse(this.binder.getBindingResult().hasErrors());

@ -21,7 +21,7 @@ class SpringIntegrationExample implements CommandLineRunner {
* Since this is a simple application that we want to exit right away,
* close the context. For an active integration application, with pollers
* etc, you can either suspend the main thread here (e.g. with System.in.read()),
* or exit the run() method without closing he context, and stop the
* or exit the run() method without closing the context, and stop the
* application later using some other technique (kill, JMX etc).
*/
context.close()

Loading…
Cancel
Save