@AfterClass public static void afterClassBaseTest() throws SQLException {
  if (testSingleHost) {
    if (!sharedConnection.isClosed()) {
      if (!tempViewList.isEmpty()) {
        Statement stmt=sharedConnection.createStatement();
        String viewName;
        while ((viewName=tempViewList.poll()) != null) {
          try {
            stmt.execute("DROP VIEW IF EXISTS " + viewName);
          }
 catch (          SQLException e) {
          }
        }
      }
      if (!tempTableList.isEmpty()) {
        Statement stmt=sharedConnection.createStatement();
        String tableName;
        while ((tableName=tempTableList.poll()) != null) {
          try {
            stmt.execute("DROP TABLE IF EXISTS " + tableName);
          }
 catch (          SQLException e) {
          }
        }
      }
      if (!tempProcedureList.isEmpty()) {
        Statement stmt=sharedConnection.createStatement();
        String procedureName;
        while ((procedureName=tempProcedureList.poll()) != null) {
          try {
            stmt.execute("DROP procedure IF EXISTS " + procedureName);
          }
 catch (          SQLException e) {
          }
        }
      }
      if (!tempFunctionList.isEmpty()) {
        Statement stmt=sharedConnection.createStatement();
        String functionName;
        while ((functionName=tempFunctionList.poll()) != null) {
          try {
            stmt.execute("DROP FUNCTION IF EXISTS " + functionName);
          }
 catch (          SQLException e) {
          }
        }
      }
    }
    try {
      sharedConnection.close();
    }
 catch (    SQLException e) {
      e.printStackTrace();
    }
  }
}

@ AfterClass public static void afterClassBaseTest ( ) throws SQLException { if ( testSingleHost ) { if ( ! sharedConnection . isClosed ( ) ) { if ( ! tempViewList . isEmpty ( ) ) { Statement stmt = sharedConnection . createStatement ( ) ; String viewName ; while ( ( viewName = tempViewList . poll ( ) ) != null ) { try { stmt . execute ( "DROP VIEW IF EXISTS " + viewName ) ; } catch ( SQLException e ) { } } } if ( ! tempTableList . isEmpty ( ) ) { Statement stmt = sharedConnection . createStatement ( ) ; String tableName ; while ( ( tableName = tempTableList . poll ( ) ) != null ) { try { stmt . execute ( "DROP TABLE IF EXISTS " + tableName ) ; } catch ( SQLException e ) { } } } if ( ! tempProcedureList . isEmpty ( ) ) { Statement stmt = sharedConnection . createStatement ( ) ; String procedureName ; while ( ( procedureName = tempProcedureList . poll ( ) ) != null ) { try { stmt . execute ( "DROP procedure IF EXISTS " + procedureName ) ; } catch ( SQLException e ) { } } } if ( ! tempFunctionList . isEmpty ( ) ) { Statement stmt = sharedConnection . createStatement ( ) ; String functionName ; while ( ( functionName = tempFunctionList . poll ( ) ) != null ) { try { stmt . execute ( "DROP FUNCTION IF EXISTS " + functionName ) ; } catch ( SQLException e ) { } } } } try { sharedConnection . close ( ) ; } catch ( SQLException e ) { e . printStackTrace ( ) ; } } }
destroy the test tables .
