This commit is contained in:
Andy Wilkinson
2017-10-17 15:41:46 +01:00
parent 70f6c784c7
commit 688da652ac
26 changed files with 244 additions and 225 deletions

View File

@@ -74,8 +74,8 @@ public class ShutdownEndpointTests {
EmptyConfig.class).child(EndpointConfig.class)
.web(WebApplicationType.NONE).run();
CountDownLatch latch = context.getBean(EndpointConfig.class).latch;
assertThat(context.getBean(ShutdownEndpoint.class).shutdown()
.get("message")).startsWith("Shutting down");
assertThat(context.getBean(ShutdownEndpoint.class).shutdown().get("message"))
.startsWith("Shutting down");
assertThat(context.isActive()).isTrue();
assertThat(latch.await(10, TimeUnit.SECONDS)).isTrue();
}
@@ -87,8 +87,8 @@ public class ShutdownEndpointTests {
.web(WebApplicationType.NONE).run();
CountDownLatch parentLatch = context.getBean(EndpointConfig.class).latch;
CountDownLatch childLatch = context.getBean(EmptyConfig.class).latch;
assertThat(context.getBean(ShutdownEndpoint.class).shutdown()
.get("message")).startsWith("Shutting down");
assertThat(context.getBean(ShutdownEndpoint.class).shutdown().get("message"))
.startsWith("Shutting down");
assertThat(context.isActive()).isTrue();
assertThat(parentLatch.await(10, TimeUnit.SECONDS)).isTrue();
assertThat(childLatch.await(10, TimeUnit.SECONDS)).isTrue();