use of org.junit.After in project jackrabbit-oak by apache.
the class LdapLoginTestBase method after.
@After
public void after() throws Exception {
if (!USE_COMMON_LDAP_FIXTURE) {
LDAP_SERVER.tearDown();
}
try {
Authorizable a = userManager.getAuthorizable(USER_ID);
if (a != null) {
a.remove();
}
if (GROUP_DN != null) {
a = userManager.getAuthorizable(GROUP_DN);
if (a != null) {
a.remove();
}
}
root.commit();
} finally {
root.refresh();
super.after();
}
}
use of org.junit.After in project geode by apache.
the class OffHeapRegionBase method cleanUp.
@After
public void cleanUp() {
File dir = new File(".");
File[] files = dir.listFiles(new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
return name.startsWith("BACKUP");
}
});
for (File file : files) {
file.delete();
}
}
use of org.junit.After in project geode by apache.
the class DiskRegionTestingBase method tearDown.
@After
public final void tearDown() throws Exception {
preTearDown();
try {
if (cache != null && !cache.isClosed()) {
for (Iterator itr = cache.rootRegions().iterator(); itr.hasNext(); ) {
Region root = (Region) itr.next();
if (root.isDestroyed() || root instanceof HARegion) {
continue;
}
try {
logWriter.info("<ExpectedException action=add>RegionDestroyedException</ExpectedException>");
root.localDestroyRegion("teardown");
logWriter.info("<ExpectedException action=remove>RegionDestroyedException</ExpectedException>");
} catch (RegionDestroyedException ignore) {
// ignore
}
}
}
for (DiskStore dstore : ((InternalCache) cache).listDiskStoresIncludingRegionOwned()) {
((DiskStoreImpl) dstore).waitForClose();
}
} finally {
closeCache();
}
ds.disconnect();
// Asif : below is not needed but leave it
deleteFiles();
DiskStoreImpl.SET_IGNORE_PREALLOCATE = false;
postTearDown();
}
use of org.junit.After in project geode by apache.
the class GfshHistoryJUnitTest method teardown.
@After
public void teardown() throws Exception {
// Null out static instance so Gfsh can be reinitialised
Field gfshInstance = Gfsh.class.getDeclaredField("instance");
gfshInstance.setAccessible(true);
gfshInstance.set(null, null);
}
use of org.junit.After in project geode by apache.
the class PdxAttributesJUnitTest method tearDown.
@After
public void tearDown() throws Exception {
GemFireCacheImpl instance = GemFireCacheImpl.getInstance();
if (instance != null) {
instance.close();
}
FileUtils.deleteDirectory(diskDir);
File[] defaultStoreFiles = new File(".").listFiles(new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.startsWith("BACKUPPDXAttributes");
}
});
for (File file : defaultStoreFiles) {
FileUtils.forceDelete(file);
}
}
Aggregations