Search in sources :

Example 16 with AfterClass

use of org.junit.AfterClass in project translationstudio8 by heartsome.

the class ImportToDBTest method end.

@AfterClass
public static void end() {
    // 删除用完的数据库
    HsRow dbRow = shImportTMXData.new HsRow(1);
    MemoryDBManagement db = new MemoryDBManagement(dbRow);
    db.deleteDB(TsUIConstants.Entry.MENU, true);
}
Also used : HsRow(net.heartsome.test.utilities.poi.ExcelUtil.HsSheet.HsRow) MemoryDBManagement(net.heartsome.cat.ts.test.basecase.menu.db.MemoryDBManagement) AfterClass(org.junit.AfterClass)

Example 17 with AfterClass

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

the class TestHttpsFileSystem method tearDown.

@AfterClass
public static void tearDown() throws Exception {
    if (cluster != null) {
        cluster.shutdown();
    }
    FileUtil.fullyDelete(new File(BASEDIR));
    KeyStoreTestUtil.cleanupSSLConfig(keystoresDir, sslConfDir);
}
Also used : File(java.io.File) AfterClass(org.junit.AfterClass)

Example 18 with AfterClass

use of org.junit.AfterClass in project querydsl by querydsl.

the class AbstractJDOTest method doCleanUp.

@AfterClass
public static void doCleanUp() {
    // Clean out the database
    PersistenceManager pm = pmf.getPersistenceManager();
    Transaction tx = pm.currentTransaction();
    try {
        tx.begin();
        pm.newQuery(Store.class).deletePersistentAll();
        pm.newQuery(Book.class).deletePersistentAll();
        pm.newQuery(Product.class).deletePersistentAll();
        tx.commit();
    } finally {
        if (tx.isActive()) {
            tx.rollback();
        }
        pm.close();
    }
}
Also used : Transaction(javax.jdo.Transaction) PersistenceManager(javax.jdo.PersistenceManager) Book(com.querydsl.jdo.test.domain.Book) Store(com.querydsl.jdo.test.domain.Store) Product(com.querydsl.jdo.test.domain.Product) AfterClass(org.junit.AfterClass)

Example 19 with AfterClass

use of org.junit.AfterClass in project randomizedtesting by randomizedtesting.

the class WithNestedTestClass method clearNested.

@AfterClass
public static final void clearNested() throws Exception {
    zombieToken = null;
    runningNested = false;
    ApplyAtPlace.runnable = null;
    ApplyAtPlace.place = null;
    System.setOut(sysout);
    System.setErr(syserr);
    for (Handler h : logger.getHandlers()) logger.removeHandler(h);
    for (Handler h : handlers) logger.addHandler(h);
    for (Thread t : zombies) {
        t.interrupt();
    }
    for (Thread t : zombies) {
        t.join();
    }
}
Also used : Handler(java.util.logging.Handler) AfterClass(org.junit.AfterClass)

Example 20 with AfterClass

use of org.junit.AfterClass in project DirectMemory by raffaeleguidi.

the class BaseTests method setup.

@BeforeClass
@AfterClass
public static void setup() {
    rnd = new Random();
    //		logger.info("off-heap allocated: " + Ram.inMb(mem.capacity()));
    //		logger.info("off-heap used:      " + Ram.inMb(mem.used()));
    logger.info("test - size: " + test.size());
    logger.info("test - errors: " + errors);
    logger.info("heap - max: " + Ram.inMb(Runtime.getRuntime().maxMemory()));
    logger.info("heap - allocated: " + Ram.inMb(Runtime.getRuntime().totalMemory()));
    logger.info("heap - free : " + Ram.inMb(Runtime.getRuntime().freeMemory()));
    logger.info("************************************************");
}
Also used : Random(java.util.Random) BeforeClass(org.junit.BeforeClass) 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