Fix tests

This commit is contained in:
Madhura Bhave 2017-03-13 13:58:17 -07:00
parent cb1096dc7f
commit 8743148ccd
1 changed files with 4 additions and 4 deletions

View File

@ -449,11 +449,11 @@ public abstract class AbstractServletWebServerFactoryTests {
@Test @Test
public void sslKeyAlias() throws Exception { public void sslKeyAlias() throws Exception {
AbstractEmbeddedServletContainerFactory factory = getFactory(); AbstractServletWebServerFactory factory = getFactory();
factory.setSsl(getSsl(null, "password", "test-alias", "src/test/resources/test.jks")); factory.setSsl(getSsl(null, "password", "test-alias", "src/test/resources/test.jks"));
this.container = factory.getEmbeddedServletContainer( this.webServer = factory.getWebServer(
new ServletRegistrationBean(new ExampleServlet(true, false), "/hello")); new ServletRegistrationBean<>(new ExampleServlet(true, false), "/hello"));
this.container.start(); this.webServer.start();
SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory( SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory(
new SSLContextBuilder() new SSLContextBuilder()
.loadTrustMaterial(null, new SerialNumberValidatingTrustSelfSignedStrategy("77e7c302")).build()); .loadTrustMaterial(null, new SerialNumberValidatingTrustSelfSignedStrategy("77e7c302")).build());