Search in sources :

Example 6 with AfterTest

use of org.testng.annotations.AfterTest in project airavata by apache.

the class AiravataIT method cleanUp.

@AfterTest(alwaysRun = true)
private void cleanUp() {
    logger.info("cleanUp() -> Launching test experiment......");
    Process p;
    try {
        String result = null;
        p = Runtime.getRuntime().exec("base-airavata/apache-airavata-server-0.17-SNAPSHOT/bin/airavata-server-stop.sh -f");
        BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
        while ((result = br.readLine()) != null) System.out.println("line: " + result);
        p.waitFor();
        System.out.println("exit: " + p.exitValue());
        p.destroy();
    } catch (Exception e) {
        logger.error("Error occured while cleanup", e);
        Assert.fail();
    }
}
Also used : InputStreamReader(java.io.InputStreamReader) BufferedReader(java.io.BufferedReader) AfterTest(org.testng.annotations.AfterTest)

Example 7 with AfterTest

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

the class FilesystemTest method cleanUpFilesystem.

@AfterTest
public void cleanUpFilesystem() throws Exception {
    IntegrationTestContext itContext = getItContext();
    Map<String, String> cloudProviderParams = itContext.getContextParam(CloudbreakITContextConstants.CLOUDPROVIDER_PARAMETERS, Map.class);
    FilesystemUtil.cleanUpFiles(applicationContext, cloudProviderParams, fsParams.get("filesystemType"), fsParams.get("filesystemName"), fsParams.get("folderPrefix"), fsParams.get("wasbContainerName"));
}
Also used : IntegrationTestContext(com.sequenceiq.it.IntegrationTestContext) AfterTest(org.testng.annotations.AfterTest)

Example 8 with AfterTest

use of org.testng.annotations.AfterTest in project rest.li by linkedin.

the class TestRestLiD2Integration method teardown.

@AfterTest
public void teardown() throws Exception {
    final CountDownLatch latch = new CountDownLatch(1);
    _loadBalancer.shutdown(new PropertyEventThread.PropertyEventShutdownCallback() {

        @Override
        public void done() {
            latch.countDown();
        }
    });
    latch.await();
}
Also used : CountDownLatch(java.util.concurrent.CountDownLatch) PropertyEventThread(com.linkedin.d2.discovery.event.PropertyEventThread) AfterTest(org.testng.annotations.AfterTest)

Example 9 with AfterTest

use of org.testng.annotations.AfterTest in project openj9 by eclipse.

the class TestJmap method preserveHelloWorld.

@AfterTest
private void preserveHelloWorld() {
    /* force the objects to stay alive */
    for (HelloWorld instance : hws) {
        log(instance.getClass().getName());
    }
    log(Integer.toString(objectArray.hashCode()));
    log(Integer.toString(objectVector.hashCode()));
    log(Integer.toString(primitiveArray.hashCode()));
    log(Integer.toString(primitiveVector.hashCode()));
}
Also used : HelloWorld(org.openj9.test.util.HelloWorld) AfterTest(org.testng.annotations.AfterTest)

Aggregations

AfterTest (org.testng.annotations.AfterTest)9 CLIRequest (com.sun.identity.cli.CLIRequest)2 OrganizationConfigManager (com.sun.identity.sm.OrganizationConfigManager)2 HashSet (java.util.HashSet)2 Set (java.util.Set)2 Parameters (org.testng.annotations.Parameters)2 SSOToken (com.iplanet.sso.SSOToken)1 PropertyEventThread (com.linkedin.d2.discovery.event.PropertyEventThread)1 IntegrationTestContext (com.sequenceiq.it.IntegrationTestContext)1 AMIdentity (com.sun.identity.idm.AMIdentity)1 AMIdentityRepository (com.sun.identity.idm.AMIdentityRepository)1 IdSearchControl (com.sun.identity.idm.IdSearchControl)1 IdSearchResults (com.sun.identity.idm.IdSearchResults)1 ReleaseContext (iso.std.iso_iec._24727.tech.schema.ReleaseContext)1 BufferedReader (java.io.BufferedReader)1 File (java.io.File)1 InputStreamReader (java.io.InputStreamReader)1 CountDownLatch (java.util.concurrent.CountDownLatch)1 HelloWorld (org.openj9.test.util.HelloWorld)1