use of org.testng.annotations.AfterClass in project OpenAM by OpenRock.
the class ReferralPrivilegeTest method cleanup.
@AfterClass
public void cleanup() throws Exception {
if (!migrated) {
return;
}
IdRepoUtils.deleteIdentity("/", user);
OrganizationConfigManager ocm = new OrganizationConfigManager(adminToken, "/");
ocm.deleteSubOrganization(SUB_REALM1.substring(1), true);
ocm.deleteSubOrganization(SUB_REALM2.substring(1), true);
}
use of org.testng.annotations.AfterClass in project OpenAM by OpenRock.
the class ApplicationCacheAfterRealmChangeTest method cleanup.
@AfterClass
public void cleanup() throws Exception {
if (!migrated) {
return;
}
OrganizationConfigManager ocm = new OrganizationConfigManager(adminToken, "/");
String subRealm = SUB_REALM.substring(1);
ocm.deleteSubOrganization(subRealm, true);
setOrgAlias(false);
}
use of org.testng.annotations.AfterClass in project sakuli by ConSol.
the class LoggerTest method clean.
@AfterClass
public void clean() throws IOException {
Path logFile = Paths.get(properties.getLogFile());
deleteFile(logFile);
deleteFile(logFile.getParent());
}
use of org.testng.annotations.AfterClass in project pinot by linkedin.
the class HybridClusterIntegrationTest method tearDown.
@AfterClass
public void tearDown() throws Exception {
// Try deleting the tables and check that they have no routing table
dropOfflineTable(getTableName());
dropRealtimeTable(getTableName());
long endTime = System.currentTimeMillis() + 15000;
boolean isRoutingTableEmpty = false;
JSONObject routingTableSnapshot = null;
while (System.currentTimeMillis() < endTime) {
try {
routingTableSnapshot = getDebugInfo("debug/routingTable/" + getTableName());
if (routingTableSnapshot.getJSONArray("routingTableSnapshot").length() == 0) {
isRoutingTableEmpty = true;
break;
}
} catch (Exception e) {
// Will retry in a bit
}
Uninterruptibles.sleepUninterruptibly(500, TimeUnit.MILLISECONDS);
}
Assert.assertTrue(isRoutingTableEmpty, "Routing table is not empty, last snapshot is " + routingTableSnapshot.toString());
stopBroker();
stopController();
stopServer();
KafkaStarterUtils.stopServer(kafkaStarter);
try {
stopZk();
} catch (Exception e) {
// Swallow ZK Exceptions.
}
cleanup();
}
use of org.testng.annotations.AfterClass in project OpenAM by OpenRock.
the class IDPPTest method cleanup.
@AfterClass
public void cleanup() throws Exception {
if (!migrated) {
return;
}
PolicyManager policyMgr = new PolicyManager(adminToken, orgName);
policyMgr.removePolicy("IDPPTestPolicy1");
Set<AMIdentity> identities = new HashSet<AMIdentity>();
identities.add(user1);
identities.add(group1);
IdRepoUtils.deleteIdentities(orgName, identities);
}
Aggregations