do not use hardcoded port

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
This commit is contained in:
olivier lamy 2021-03-24 13:50:38 +10:00 committed by Olivier Lamy
parent d295aa6d63
commit 63810134c7

View File

@ -167,7 +167,7 @@ public class EmbeddedWeldTest
@Test @Test
public void testWebappContext() throws Exception public void testWebappContext() throws Exception
{ {
Server server = new Server(8080); Server server = new Server(0);
server.addConnector(new LocalConnector(server)); server.addConnector(new LocalConnector(server));
WebAppContext webapp = new WebAppContext(); WebAppContext webapp = new WebAppContext();
webapp.setContextPath("/"); webapp.setContextPath("/");
@ -199,7 +199,7 @@ public class EmbeddedWeldTest
@Test @Test
public void testWebappContextDiscovered() throws Exception public void testWebappContextDiscovered() throws Exception
{ {
Server server = new Server(8080); Server server = new Server(0);
server.addConnector(new LocalConnector(server)); server.addConnector(new LocalConnector(server));
WebAppContext webapp = new WebAppContext(); WebAppContext webapp = new WebAppContext();
webapp.setContextPath("/"); webapp.setContextPath("/");