Search in sources :

Example 66 with AfterClass

use of org.testng.annotations.AfterClass in project helix by apache.

the class TestMixedModeAutoRebalance method afterClass.

@AfterClass
public void afterClass() throws Exception {
    /**
     * shutdown order: 1) disconnect the controller 2) disconnect participants
     */
    _controller.syncStop();
    for (MockParticipantManager participant : _participants) {
        participant.syncStop();
    }
    System.out.println("END " + CLASS_NAME + " at " + new Date(System.currentTimeMillis()));
}
Also used : MockParticipantManager(org.apache.helix.integration.manager.MockParticipantManager) Date(java.util.Date) AfterClass(org.testng.annotations.AfterClass)

Example 67 with AfterClass

use of org.testng.annotations.AfterClass in project presto by prestodb.

the class TestFileMergeCacheManager method close.

@AfterClass
public void close() throws IOException {
    flushExecutor.shutdown();
    removeExecutor.shutdown();
    checkState(cacheDirectory != null);
    checkState(fileDirectory != null);
    Files.deleteIfExists(dataFile.toPath());
    File[] files = new File(cacheDirectory).listFiles();
    if (files != null) {
        for (File file : files) {
            Files.delete(file.toPath());
        }
    }
    Files.deleteIfExists(new File(cacheDirectory).toPath());
    Files.deleteIfExists(new File(fileDirectory).toPath());
}
Also used : RandomAccessFile(java.io.RandomAccessFile) File(java.io.File) AfterClass(org.testng.annotations.AfterClass)

Example 68 with AfterClass

use of org.testng.annotations.AfterClass in project presto by prestodb.

the class TestGenericPartitioningSpiller method tearDown.

@AfterClass(alwaysRun = true)
public void tearDown() throws Exception {
    try (Closer closer = Closer.create()) {
        closer.register(() -> scheduledExecutor.shutdownNow());
        closer.register(() -> deleteRecursively(tempDirectory, ALLOW_INSECURE));
    }
}
Also used : Closer(com.google.common.io.Closer) AfterClass(org.testng.annotations.AfterClass)

Example 69 with AfterClass

use of org.testng.annotations.AfterClass in project presto by prestodb.

the class TestPrometheusQueryMatrixResponseParse method tearDown.

@AfterClass(alwaysRun = true)
public void tearDown() {
    try {
        promMatrixResponse.close();
        promErrorResponse.close();
    } catch (IOException e) {
        throw new UncheckedIOException(e);
    }
}
Also used : UncheckedIOException(java.io.UncheckedIOException) IOException(java.io.IOException) UncheckedIOException(java.io.UncheckedIOException) AfterClass(org.testng.annotations.AfterClass)

Example 70 with AfterClass

use of org.testng.annotations.AfterClass in project cloudbreak by hortonworks.

the class MockClusterCreationWithSaltSuccessTest method breakDown.

@AfterClass
public void breakDown() {
    StackCreationMock stackCreationMock = getItContext().getContextParam(CloudbreakV2Constants.MOCK_SERVER, StackCreationMock.class);
    stackCreationMock.stop();
}
Also used : StackCreationMock(com.sequenceiq.it.cloudbreak.v2.mock.StackCreationMock) 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