Search in sources :

Example 66 with AfterClass

use of org.junit.AfterClass in project logging-log4j2 by apache.

the class XmlConfigurationPropsTest method cleanupClass.

@AfterClass
public static void cleanupClass() {
    System.clearProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY);
    final LoggerContext ctx = LoggerContext.getContext();
    ctx.reconfigure();
    StatusLogger.getLogger().reset();
}
Also used : LoggerContext(org.apache.logging.log4j.core.LoggerContext) AfterClass(org.junit.AfterClass)

Example 67 with AfterClass

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

the class TestMemDriverWithLogging method afterClassResetLogging.

@AfterClass
public static void afterClassResetLogging() {
    // Unfortunately, this code "knows" how log4j was set up in testing
    // Thsi is fragile.
    URL configURL = Loader.getResource("log4j.properties");
    new PropertyConfigurator().doConfigure(configURL, LogManager.getLoggerRepository());
}
Also used : PropertyConfigurator(org.apache.log4j.PropertyConfigurator) URL(java.net.URL) AfterClass(org.junit.AfterClass)

Example 68 with AfterClass

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

the class TimerEJBRuntimeNameTestCase method tearDown.

@AfterClass
public static void tearDown() throws Exception {
    ModelNode result = controllerClient.execute(composite(undeploy(DEPLOYMENT_NAME), remove(DEPLOYMENT_NAME)));
    // just to blow up
    Assert.assertTrue("Failed to undeploy: " + result, Operations.isSuccessfulOutcome(result));
}
Also used : ModelNode(org.jboss.dmr.ModelNode) AfterClass(org.junit.AfterClass)

Example 69 with AfterClass

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

the class StatefulEJBRuntimeNameTestCase method tearDown.

@AfterClass
public static void tearDown() throws Exception {
    ModelNode result = controllerClient.execute(composite(undeploy(DEPLOYMENT_NAME), remove(DEPLOYMENT_NAME)));
    // just to blow up
    Assert.assertTrue("Failed to undeploy: " + result, Operations.isSuccessfulOutcome(result));
}
Also used : ModelNode(org.jboss.dmr.ModelNode) AfterClass(org.junit.AfterClass)

Example 70 with AfterClass

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

the class StatelessEJBRuntimeNameTestCase method tearDown.

@AfterClass
public static void tearDown() throws Exception {
    ModelNode result = controllerClient.execute(composite(undeploy(DEPLOYMENT_NAME), remove(DEPLOYMENT_NAME)));
    // just to blow up
    Assert.assertTrue("Failed to undeploy: " + result, Operations.isSuccessfulOutcome(result));
}
Also used : ModelNode(org.jboss.dmr.ModelNode) 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