Search in sources :

Example 1 with AfterClass

use of org.testng.annotations.AfterClass in project pinot by linkedin.

the class FileBasedSentineTest method tearDown.

@AfterClass
public void tearDown() throws IOException {
    starter.stopAll();
    FileUtils.deleteDirectory(new File(FileBasedServerBrokerStarters.SERVER_BOOTSTRAP_DIR));
    FileUtils.deleteDirectory(avroDataDir);
    FileUtils.deleteDirectory(new File(FileBasedServerBrokerStarters.SERVER_INDEX_DIR));
}
Also used : File(java.io.File) AfterClass(org.testng.annotations.AfterClass)

Example 2 with AfterClass

use of org.testng.annotations.AfterClass in project pinot by linkedin.

the class RealtimeClusterIntegrationTest method tearDown.

@AfterClass
public void tearDown() throws Exception {
    stopBroker();
    stopController();
    stopServer();
    for (KafkaServerStartable kafkaStarter : kafkaStarters) {
        KafkaStarterUtils.stopServer(kafkaStarter);
    }
    try {
        stopZk();
    } catch (Exception e) {
    // Swallow ZK Exceptions.
    }
    FileUtils.deleteDirectory(_tmpDir);
}
Also used : KafkaServerStartable(kafka.server.KafkaServerStartable) AfterClass(org.testng.annotations.AfterClass)

Example 3 with AfterClass

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);
}
Also used : OrganizationConfigManager(com.sun.identity.sm.OrganizationConfigManager) AfterClass(org.testng.annotations.AfterClass)

Example 4 with AfterClass

use of org.testng.annotations.AfterClass in project OpenAM by OpenRock.

the class PrivilegeManagerTest method cleanup.

@AfterClass
public void cleanup() throws Exception {
    if (!migrated) {
        return;
    }
    //Sub Realm
    PrivilegeManager prmSubReam = PrivilegeManager.getInstance(SUB_REALM, SubjectUtils.createSubject(adminToken));
    prmSubReam.remove(PRIVILEGE_NAME);
    PrivilegeManager prm = PrivilegeManager.getInstance("/", SubjectUtils.createSubject(adminToken));
    prm.remove(PRIVILEGE_NAME);
    ApplicationManager.deleteApplication(adminSubject, "/", APPL_NAME);
    ApplicationManager.deleteApplication(adminSubject, SUB_REALM, APPL_NAME);
    OrganizationConfigManager orgMgr = new OrganizationConfigManager(adminToken, "/");
    orgMgr.deleteSubOrganization(SUB_REALM, true);
}
Also used : OrganizationConfigManager(com.sun.identity.sm.OrganizationConfigManager) AfterClass(org.testng.annotations.AfterClass)

Example 5 with AfterClass

use of org.testng.annotations.AfterClass in project OpenAM by OpenRock.

the class OrgAliasReferralTest method cleanup.

@AfterClass
public void cleanup() throws Exception {
    if (orgAliasEnabled) {
        OrganizationConfigManager ocm = new OrganizationConfigManager(adminToken, "/");
        ocm.deleteSubOrganization(SUB_REALM1.substring(1), true);
    }
}
Also used : OrganizationConfigManager(com.sun.identity.sm.OrganizationConfigManager) AfterClass(org.testng.annotations.AfterClass)

Aggregations

AfterClass (org.testng.annotations.AfterClass)78 File (java.io.File)19 OrganizationConfigManager (com.sun.identity.sm.OrganizationConfigManager)9 HashSet (java.util.HashSet)9 AMIdentity (com.sun.identity.idm.AMIdentity)8 SSOToken (com.iplanet.sso.SSOToken)6 PrivilegeManager (com.sun.identity.entitlement.PrivilegeManager)6 MockParticipantManager (org.apache.helix.integration.manager.MockParticipantManager)6 AMIdentityRepository (com.sun.identity.idm.AMIdentityRepository)5 Date (java.util.Date)5 FutureCallback (com.linkedin.common.callback.FutureCallback)4 None (com.linkedin.common.util.None)4 Client (com.linkedin.r2.transport.common.Client)4 MockServer (com.sequenceiq.it.cloudbreak.v2.mock.MockServer)4 Path (org.apache.hadoop.fs.Path)4 PolicyPrivilegeManager (com.sun.identity.entitlement.opensso.PolicyPrivilegeManager)3 Configuration (org.apache.hadoop.conf.Configuration)3 FileSystem (org.apache.hadoop.fs.FileSystem)3 SSOException (com.iplanet.sso.SSOException)2 TransportClientFactory (com.linkedin.r2.transport.common.TransportClientFactory)2