Merge branch '2.0.x'

pull/13757/head
Andy Wilkinson 6 years ago
commit 1ea91ece23

@ -465,10 +465,6 @@ public abstract class EndpointDiscoverer<E extends ExposableEndpoint<O>, O exten
return this.id; return this.id;
} }
public Class<?> getType() {
return this.bean.getClass();
}
public boolean isEnabledByDefault() { public boolean isEnabledByDefault() {
return this.enabledByDefault; return this.enabledByDefault;
} }

@ -35,7 +35,7 @@ import static org.mockito.Mockito.mock;
* *
* @author Yulin Qin * @author Yulin Qin
*/ */
public class MongoReactiveHealthIndicatorTest { public class MongoReactiveHealthIndicatorTests {
@Test @Test
public void testMongoIsUp() { public void testMongoIsUp() {
@ -65,7 +65,8 @@ public class MongoReactiveHealthIndicatorTest {
StepVerifier.create(health).consumeNextWith((h) -> { StepVerifier.create(health).consumeNextWith((h) -> {
assertThat(h.getStatus()).isEqualTo(Status.DOWN); assertThat(h.getStatus()).isEqualTo(Status.DOWN);
assertThat(h.getDetails()).containsOnlyKeys("error"); assertThat(h.getDetails()).containsOnlyKeys("error");
assertThat(h.getDetails().get("error")).isEqualTo("Connection failed"); assertThat(h.getDetails().get("error"))
.isEqualTo(MongoException.class.getName() + ": Connection failed");
}).verifyComplete(); }).verifyComplete();
} }

@ -73,7 +73,6 @@ import static org.springframework.web.reactive.function.server.RouterFunctions.r
public class MappingsEndpointTests { public class MappingsEndpointTests {
@Test @Test
@SuppressWarnings("unchecked")
public void servletWebMappings() { public void servletWebMappings() {
Supplier<ConfigurableWebApplicationContext> contextSupplier = prepareContextSupplier(); Supplier<ConfigurableWebApplicationContext> contextSupplier = prepareContextSupplier();
new WebApplicationContextRunner(contextSupplier) new WebApplicationContextRunner(contextSupplier)
@ -100,7 +99,6 @@ public class MappingsEndpointTests {
} }
@Test @Test
@SuppressWarnings("unchecked")
public void servletWebMappingsWithAdditionalDispatcherServlets() { public void servletWebMappingsWithAdditionalDispatcherServlets() {
Supplier<ConfigurableWebApplicationContext> contextSupplier = prepareContextSupplier(); Supplier<ConfigurableWebApplicationContext> contextSupplier = prepareContextSupplier();
new WebApplicationContextRunner(contextSupplier).withUserConfiguration( new WebApplicationContextRunner(contextSupplier).withUserConfiguration(
@ -121,6 +119,7 @@ public class MappingsEndpointTests {
}); });
} }
@SuppressWarnings("unchecked")
private Supplier<ConfigurableWebApplicationContext> prepareContextSupplier() { private Supplier<ConfigurableWebApplicationContext> prepareContextSupplier() {
ServletContext servletContext = mock(ServletContext.class); ServletContext servletContext = mock(ServletContext.class);
given(servletContext.getInitParameterNames()) given(servletContext.getInitParameterNames())

Loading…
Cancel
Save