use of org.junit.After in project deeplearning4j by deeplearning4j.
the class SentenceIteratorTest method after.
@After
public void after() throws Exception {
File test = new File("dir");
test.mkdir();
FileUtils.deleteQuietly(test);
FileUtils.deleteQuietly(new File("multidir"));
}
use of org.junit.After in project elasticsearch by elastic.
the class CloseIndexDisableCloseAllIT method afterTest.
@After
public void afterTest() {
Settings settings = Settings.builder().put(TransportCloseIndexAction.CLUSTER_INDICES_CLOSE_ENABLE_SETTING.getKey(), (String) null).build();
assertAcked(client().admin().cluster().prepareUpdateSettings().setTransientSettings(settings));
}
use of org.junit.After in project elasticsearch by elastic.
the class TribeIT method wipeRemoteClusters.
@After
public void wipeRemoteClusters() {
doWithAllClusters(c -> {
final String clusterName = c.getClusterName();
try {
c.client().admin().indices().prepareDelete(MetaData.ALL).get();
c.afterTest();
} catch (IOException e) {
throw new RuntimeException("Failed to clean up remote cluster [" + clusterName + "]", e);
}
});
}
use of org.junit.After in project jetty.project by eclipse.
the class TestNamingEntries method after.
/**
* after each test we should scrape out any lingering bindings to prevent cross test pollution
* as observed when running java 7
*
* @throws Exception on test failure
*/
@After
public void after() throws Exception {
InitialContext icontext = new InitialContext();
NamingEnumeration<Binding> bindings = icontext.listBindings("");
List<String> names = new ArrayList<String>();
while (bindings.hasMore()) {
Binding bd = (Binding) bindings.next();
names.add(bd.getName());
}
for (String name : names) {
icontext.unbind(name);
}
}
use of org.junit.After in project jetty.project by eclipse.
the class PlusDescriptorProcessorTest method tearDown.
@After
public void tearDown() throws Exception {
ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(context.getClassLoader());
Context ic = new InitialContext();
Context compCtx = (Context) ic.lookup("java:comp");
compCtx.destroySubcontext("env");
Thread.currentThread().setContextClassLoader(oldLoader);
}
Aggregations