/** * Start the server on a random local port. * * @throws Exception * the server cannot be started, testing is not possible. */ public void setUp() throws Exception { RecordingLogger.clear(); log.clear(); server.start(); config.setSecurePort(getSecurePort()); if (secureConfig != null) { secureConfig.setSecurePort(getSecurePort()); } }
/** * Start the server * * @throws Exception */ public void start() throws Exception { ServletContextHandler sBasic = server.authBasic(smart("/sbasic")); server.setUp(); final String srcName = db.getDirectory().getName(); uri = toURIish(sBasic, srcName); int sslPort = server.getSecurePort(); if (sslPort > 0) { secureUri = uri.setPort(sslPort).setScheme("https"); } }