modules/tests/test-integration/src/test/java/org/ballerinalang/test/context/ServerInstance.java
/**
     * Start a server instance y extracting a server zip distribution.
     *
     * @throws Exception
     */
Start a server instance y extracting a server zip distribution.
@throws Exception
Start a server instance y extracting a server zip distribution . @throws Exception
@Override
    public void start() throws Exception {
        Utils.checkPortAvailability(httpServerPort);
        if (serverHome == null) {
            serverHome = setUpServerHome(serverDistribution);
            log.info("Server Home " + serverHome);
            configServer();
        }
        if (args == null | args.length == 0) {
            throw new IllegalArgumentException("No Argument provided for server startup.");
        }
        log.info("Starting server..");
        startProcess(args);
        serverInfoLogReader = new ServerLogReader("inputStream", process.getInputStream());
        serverInfoLogReader.start();
        serverErrorLogReader = new ServerLogReader("errorStream", process.getErrorStream());
        serverErrorLogReader.start();
        log.info("Waiting for port " + httpServerPort + " to open");
        Utils.waitForPort(httpServerPort, 1000 * 60 * 2, false, "localhost");
        log.info("Server Started Successfully.");
        isServerRunning = true;
    }
@ Override public void start ( ) throws Exception { Utils . checkPortAvailability ( httpServerPort ) ; if ( serverHome == null ) { serverHome = setUpServerHome ( serverDistribution ) ; log . info ( "Server Home " + serverHome ) ; configServer ( ) ; } if ( args == null | args . length == 0 ) { throw new IllegalArgumentException ( "No Argument provided for server startup." ) ; } log . info ( "Starting server.." ) ; startProcess ( args ) ; serverInfoLogReader = new ServerLogReader ( "inputStream" , process . getInputStream ( ) ) ; serverInfoLogReader . start ( ) ; serverErrorLogReader = new ServerLogReader ( "errorStream" , process . getErrorStream ( ) ) ; serverErrorLogReader . start ( ) ; log . info ( "Waiting for port " + httpServerPort + " to open" ) ; Utils . waitForPort ( httpServerPort , 1000 * 60 * 2 , false , "localhost" ) ; log . info ( "Server Started Successfully." ) ; isServerRunning = true ; }
Start a server instance y extracting a server zip distribution.
Start a server instance y extracting a server zip distribution .