Search in sources :

Example 41 with AfterClass

use of org.testng.annotations.AfterClass in project incubator-gobblin by apache.

the class FsDatasetStateStoreTest method tearDown.

@AfterClass
public void tearDown() throws IOException {
    FileSystem fs = FileSystem.getLocal(new Configuration(false));
    Path rootDir = new Path(FsDatasetStateStoreTest.class.getSimpleName());
    if (fs.exists(rootDir)) {
        fs.delete(rootDir, true);
    }
}
Also used : Path(org.apache.hadoop.fs.Path) Configuration(org.apache.hadoop.conf.Configuration) FileSystem(org.apache.hadoop.fs.FileSystem) AfterClass(org.testng.annotations.AfterClass)

Example 42 with AfterClass

use of org.testng.annotations.AfterClass in project incubator-gobblin by apache.

the class HeapDumpForTaskUtilsTest method tearDown.

@AfterClass
public void tearDown() throws IOException {
    fs.delete(new Path(TEST_DIR), true);
    fs.close();
}
Also used : Path(org.apache.hadoop.fs.Path) AfterClass(org.testng.annotations.AfterClass)

Example 43 with AfterClass

use of org.testng.annotations.AfterClass in project incubator-gobblin by apache.

the class OrchestratorTest method cleanUp.

@AfterClass
public void cleanUp() throws Exception {
    // Shutdown Catalog
    this.serviceLauncher.stop();
    File specStoreDir = new File(SPEC_STORE_PARENT_DIR);
    if (specStoreDir.exists()) {
        FileUtils.deleteDirectory(specStoreDir);
    }
}
Also used : File(java.io.File) AfterClass(org.testng.annotations.AfterClass)

Example 44 with AfterClass

use of org.testng.annotations.AfterClass in project incubator-gobblin by apache.

the class TopologyCatalogTest method cleanUp.

@AfterClass
public void cleanUp() throws Exception {
    // Shutdown Catalog
    this.serviceLauncher.stop();
    File specStoreDir = new File(SPEC_STORE_DIR);
    if (specStoreDir.exists()) {
        FileUtils.deleteDirectory(specStoreDir);
    }
}
Also used : File(java.io.File) AfterClass(org.testng.annotations.AfterClass)

Example 45 with AfterClass

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();
}
Also used : JSONObject(org.json.JSONObject) AfterClass(org.testng.annotations.AfterClass)

Aggregations

AfterClass (org.testng.annotations.AfterClass)90 File (java.io.File)23 OrganizationConfigManager (com.sun.identity.sm.OrganizationConfigManager)9 HashSet (java.util.HashSet)9 AMIdentity (com.sun.identity.idm.AMIdentity)8 Configuration (org.apache.hadoop.conf.Configuration)7 FileSystem (org.apache.hadoop.fs.FileSystem)7 Path (org.apache.hadoop.fs.Path)7 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 DeleteFileVisitor (com.qubole.rubix.common.utils.DeleteFileVisitor)3 PolicyPrivilegeManager (com.sun.identity.entitlement.opensso.PolicyPrivilegeManager)3 SSOException (com.iplanet.sso.SSOException)2