Search in sources :

Example 91 with AfterClass

use of org.junit.AfterClass in project dal by ctripcorp.

the class DalTableDaoShardByDbTableSqlSvrTest method tearDownAfterClass.

@AfterClass
public static void tearDownAfterClass() throws Exception {
    DalHints hints = new DalHints();
    String[] sqls = null;
    // For Sql Server
    hints = new DalHints();
    for (int i = 0; i < mod; i++) {
        sqls = new String[tableMod];
        for (int j = 0; j < tableMod; j++) {
            sqls[j] = String.format(DROP_TABLE_SQL_SQLSVR_TPL, j, j);
        }
        clientSqlSvr.batchUpdate(sqls, hints.inShard(i));
    }
}
Also used : DalHints(com.ctrip.platform.dal.dao.DalHints) AfterClass(org.junit.AfterClass)

Example 92 with AfterClass

use of org.junit.AfterClass in project dal by ctripcorp.

the class PartialQueryTableDaoUnitTest method tearDownAfterClass.

@AfterClass
public static void tearDownAfterClass() throws Exception {
    DalHints hints = new DalHints();
    String[] sqls = null;
    // For Sql Server
    hints = new DalHints();
    for (int i = 0; i < mod; i++) {
        clientMySql.update(DROP_TABLE_SQL_MYSQL_TPL_ORIGINAL, new StatementParameters(), hints.inShard(i));
        sqls = new String[tableMod];
        for (int j = 0; j < tableMod; j++) {
            sqls[j] = String.format(DROP_TABLE_SQL_MYSQL_TPL, j);
        }
        clientMySql.batchUpdate(sqls, hints.inShard(i));
    }
}
Also used : DalHints(com.ctrip.platform.dal.dao.DalHints) StatementParameters(com.ctrip.platform.dal.dao.StatementParameters) AfterClass(org.junit.AfterClass)

Example 93 with AfterClass

use of org.junit.AfterClass in project xtext-xtend by eclipse.

the class BuildAffectionTest method tearDownProject.

@AfterClass
public static void tearDownProject() throws Exception {
    IResourcesSetupUtil.cleanWorkspace();
    final IWorkspace workspace = ResourcesPlugin.getWorkspace();
    final IWorkspaceDescription description = workspace.getDescription();
    description.setAutoBuilding(BuildAffectionTest.wasAutoBuilding);
    workspace.setDescription(description);
}
Also used : IWorkspaceDescription(org.eclipse.core.resources.IWorkspaceDescription) IWorkspace(org.eclipse.core.resources.IWorkspace) AfterClass(org.junit.AfterClass)

Example 94 with AfterClass

use of org.junit.AfterClass in project linuxtools by eclipse.

the class TestCreateSystemtapScript method finalCleanUp.

@AfterClass
public static void finalCleanUp() {
    projectExplorer.setFocus();
    SWTBotToolbarButton forwardButton = projectExplorer.toolbarPushButton("Forward");
    projectExplorer.toolbarPushButton("Back to Workspace").click();
    bot.waitUntil(Conditions.widgetIsEnabled(forwardButton));
    projectExplorer.bot().tree().select(SYSTEMTAP_PROJECT_NAME).contextMenu("Delete").click();
    SWTBotShell deleteShell = bot.shell("Delete Resources");
    deleteShell.bot().button("OK").click();
    bot.waitUntil(Conditions.shellCloses(deleteShell));
}
Also used : SWTBotShell(org.eclipse.swtbot.swt.finder.widgets.SWTBotShell) SWTBotToolbarButton(org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton) AfterClass(org.junit.AfterClass)

Example 95 with AfterClass

use of org.junit.AfterClass in project hive by apache.

the class TestJdbcDriver2 method tearDownAfterClass.

@AfterClass
public static void tearDownAfterClass() throws Exception {
    Statement stmt = con.createStatement();
    // drop test db and its tables and views
    stmt.execute("set hive.support.concurrency = false");
    stmt.execute("drop database if exists " + testDbName + " cascade");
    stmt.close();
    con.close();
}
Also used : PreparedStatement(java.sql.PreparedStatement) Statement(java.sql.Statement) AfterClass(org.junit.AfterClass)

Aggregations

AfterClass (org.junit.AfterClass)231 File (java.io.File)83 DalHints (com.ctrip.platform.dal.dao.DalHints)25 FileSystem (org.apache.hadoop.fs.FileSystem)14 Path (org.apache.hadoop.fs.Path)14 HashMap (java.util.HashMap)12 IOException (java.io.IOException)11 StatementParameters (com.ctrip.platform.dal.dao.StatementParameters)9 ModelNode (org.jboss.dmr.ModelNode)8 Statement (java.sql.Statement)7 ScenarioConfiguration (org.apache.hadoop.mapred.nativetask.testutil.ScenarioConfiguration)7 FileOutputStream (java.io.FileOutputStream)6 RelationManager (edu.uci.ics.textdb.storage.RelationManager)5 ClientException (edu.umass.cs.gnscommon.exceptions.client.ClientException)5 Configuration (org.apache.hadoop.conf.Configuration)5 HttpSolrClient (org.apache.solr.client.solrj.impl.HttpSolrClient)5 RelationManager (edu.uci.ics.texera.storage.RelationManager)4 Method (java.lang.reflect.Method)4 SQLException (java.sql.SQLException)4 LoggerContext (org.apache.logging.log4j.core.LoggerContext)4