shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/it/BaseITCase.java
/**
     * Ensure to close shardingsphere datasource.
     * @param dataSource shardingsphere datasource
     * @throws Exception sql execute exception.
     */
Ensure to close shardingsphere datasource.
@param dataSource shardingsphere datasource
@throws Exception sql execute exception.
Ensure to close shardingsphere datasource . @param dataSource shardingsphere datasource @throws Exception sql execute exception .
private void closeDataSource(final ShardingSphereDataSource dataSource) throws Exception {
        try (Connection connection = dataSource.getConnection()) {
            connection.createStatement().execute("SELECT 1");
        }
        dataSource.getContextManager().close();
    }
private void closeDataSource ( final ShardingSphereDataSource dataSource ) throws Exception { try ( Connection connection = dataSource . getConnection ( ) ) { connection . createStatement ( ) . execute ( "SELECT 1" ) ; } dataSource . getContextManager ( ) . close ( ) ; }
Ensure to close shardingsphere datasource.
Ensure to close shardingsphere datasource .