modules/tests/test-integration/src/test/java/org/ballerinalang/test/listener/TestExecutionListener.java
@Override
    public void onExecutionFinish() {
        if (newServer != null && newServer.isRunning()) {
            try {
                newServer.stop();
            } catch (Exception e) {
                log.error("Server failed to stop. " + e.getMessage(), e);
                throw new RuntimeException("Server failed to stop. " + e.getMessage(), e);
            }
        }
    }
/**
     * This method will execute after all the test classes are executed and this will stop the server
     * started by start method.
     *
     */
This method will execute after all the test classes are executed and this will stop the server
started by start method.
This method will execute after all the test classes are executed and this will stop the server started by start method .
@Override
    public void onExecutionFinish() {
        if (newServer != null && newServer.isRunning()) {
            try {
                newServer.stop();
            } catch (Exception e) {
                log.error("Server failed to stop. " + e.getMessage(), e);
                throw new RuntimeException("Server failed to stop. " + e.getMessage(), e);
            }
        }
    }
@ Override public void onExecutionFinish ( ) { if ( newServer != null && newServer . isRunning ( ) ) { try { newServer . stop ( ) ; } catch ( Exception e ) { log . error ( "Server failed to stop. " + e . getMessage ( ) , e ) ; throw new RuntimeException ( "Server failed to stop. " + e . getMessage ( ) , e ) ; } } }
This method will execute after all the test classes are executed and this will stop the server
 started by start method.
This method will execute after all the test classes are executed and this will stop the server started by start method .