Class TestServer


  • public class TestServer
    extends Object
    Embedded jetty server used in the tests.
    Author:
    Velin Yordanov - Initial contribution, Henning Treu - provide in base test bundle
    • Constructor Detail

      • TestServer

        public TestServer​(String host,
                          int port,
                          int timeout,
                          org.eclipse.jetty.servlet.ServletHolder servletHolder)
        Creates a new TestServer. The server is started by startServer() and stopped by stopServer(), preferably in the tests setup & tearDown methods.
        Parameters:
        host - the host this server runs on.
        port - the port this server runs on. Use TestPortUtil to find a random free port.
        timeout - the idle timeout when receiving new messages on a connection in milliseconds.
        servletHolder - a ServletHolder which holds the Servlet content will be served from.