use of org.junit.After in project jackrabbit-oak by apache.
the class AbstractExternalAuthTest method after.
@After
public void after() throws Exception {
try {
destroyIDP();
idp = null;
if (systemSession != null) {
systemSession.close();
}
// discard any pending changes
root.refresh();
UserManager userManager = getUserManager(root);
Iterator<String> iter = getAllAuthorizableIds(userManager);
while (iter.hasNext()) {
String id = iter.next();
if (!ids.remove(id)) {
Authorizable a = userManager.getAuthorizable(id);
if (a != null) {
a.remove();
}
}
}
root.commit();
} finally {
root.refresh();
super.after();
}
}
use of org.junit.After in project lucene-solr by apache.
the class OverseerTest method tearDown.
@After
public void tearDown() throws Exception {
super.tearDown();
for (Overseer overseer : overseers) {
overseer.close();
}
overseers.clear();
for (ZkStateReader reader : readers) {
reader.close();
}
readers.clear();
for (HttpShardHandlerFactory handlerFactory : httpShardHandlerFactorys) {
handlerFactory.close();
}
httpShardHandlerFactorys.clear();
for (UpdateShardHandler updateShardHandler : updateShardHandlers) {
updateShardHandler.close();
}
updateShardHandlers.clear();
}
use of org.junit.After in project lucene-solr by apache.
the class SolrMetricsIntegrationTest method afterTest.
@After
public void afterTest() throws Exception {
SolrCoreMetricManager coreMetricManager = h.getCore().getCoreMetricManager();
Map<String, SolrMetricReporter> reporters = metricManager.getReporters(coreMetricManager.getRegistryName());
deleteCore();
for (String reporterName : RENAMED_REPORTERS) {
SolrMetricReporter reporter = reporters.get(reporterName + "@" + tag);
MockMetricReporter mockReporter = (MockMetricReporter) reporter;
assertTrue("Reporter " + reporterName + " was not closed: " + mockReporter, mockReporter.didClose);
}
}
use of org.junit.After in project jackrabbit-oak by apache.
the class AccessControlValidatorTest method after.
@After
public void after() throws Exception {
try {
Tree testRoot = root.getTree(testPath);
if (testRoot.exists()) {
testRoot.remove();
root.commit();
}
} finally {
super.after();
}
}
use of org.junit.After in project jackrabbit-oak by apache.
the class ReadOnlyVersionManagerTest method after.
@Override
@After
public void after() throws Exception {
try {
root.refresh();
Tree a = root.getTree("/a");
if (a.exists()) {
a.remove();
root.commit();
}
} finally {
super.after();
}
}
Aggregations