Search in sources :

Example 56 with AfterMethod

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

the class TestClusterVerifier method afterMethod.

@AfterMethod
public void afterMethod() {
    // Cleanup
    _controller.syncStop();
    for (MockParticipantManager participant : _participants) {
        participant.syncStop();
    }
    _admin.dropCluster(_clusterName);
}
Also used : MockParticipantManager(org.apache.helix.integration.manager.MockParticipantManager) AfterMethod(org.testng.annotations.AfterMethod)

Example 57 with AfterMethod

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

the class TestHelixAgent method afterMethod.

@AfterMethod
public void afterMethod() throws Exception {
    if (serverCmd != null) {
        // shutdown server
        ExternalCommand.execute(new File(workingDir), "simpleHttpClient.py", "exit");
        // System.out.println("simpleHttpServer output: \n" + serverCmd.getStringOutput());
        // check server has received all the requests
        String serverOutput = serverCmd.getStringOutput();
        int idx = serverOutput.indexOf("requestPath: /OFFLINE-SLAVE");
        Assert.assertTrue(idx > 0, "server should receive OFFINE->SLAVE transition");
        idx = serverOutput.indexOf("requestPath: /SLAVE-MASTER", idx);
        Assert.assertTrue(idx > 0, "server should receive SLAVE-MASTER transition");
        idx = serverOutput.indexOf("requestPath: /MASTER-SLAVE", idx);
        Assert.assertTrue(idx > 0, "server should receive MASTER-SLAVE transition");
        idx = serverOutput.indexOf("requestPath: /SLAVE-OFFLINE", idx);
        Assert.assertTrue(idx > 0, "server should receive SLAVE-OFFLINE transition");
    }
}
Also used : File(java.io.File) AfterMethod(org.testng.annotations.AfterMethod)

Example 58 with AfterMethod

use of org.testng.annotations.AfterMethod in project atmosphere by Atmosphere.

the class ExcludeSessionBroadcasterTest method unSetUp.

@AfterMethod
public void unSetUp() throws Exception {
    broadcaster.removeAtmosphereResource(ar);
    atmosphereHandler.value.set(new HashSet());
    config.getBroadcasterFactory().destroy();
}
Also used : HashSet(java.util.HashSet) AfterMethod(org.testng.annotations.AfterMethod)

Example 59 with AfterMethod

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

the class TestMySqlFunctionNamespaceManager method cleanup.

@AfterMethod
public void cleanup() {
    try (Handle handle = jdbi.open()) {
        handle.execute("DELETE FROM sql_functions");
        handle.execute("DELETE FROM function_namespaces");
    }
}
Also used : Handle(org.jdbi.v3.core.Handle) SqlFunctionHandle(com.facebook.presto.spi.function.SqlFunctionHandle) FunctionHandle(com.facebook.presto.spi.function.FunctionHandle) FunctionNamespaceTransactionHandle(com.facebook.presto.spi.function.FunctionNamespaceTransactionHandle) AfterMethod(org.testng.annotations.AfterMethod)

Example 60 with AfterMethod

use of org.testng.annotations.AfterMethod in project midpoint by Evolveum.

the class CleanupTest method cleanup.

@AfterMethod
public void cleanup() {
    try (JdbcSession jdbcSession = createJdbcSession().startTransaction()) {
        jdbcSession.newDelete(QAuditDeltaMapping.get().defaultAlias()).execute();
        jdbcSession.newDelete(QAuditItemMapping.get().defaultAlias()).execute();
        jdbcSession.newDelete(QAuditPropertyValueMapping.get().defaultAlias()).execute();
        jdbcSession.newDelete(QAuditResourceMapping.get().defaultAlias()).execute();
        jdbcSession.newDelete(QAuditRefValueMapping.get().defaultAlias()).execute();
        jdbcSession.newDelete(QAuditEventRecordMapping.get().defaultAlias()).execute();
        jdbcSession.commit();
    }
}
Also used : JdbcSession(com.evolveum.midpoint.repo.sqlbase.JdbcSession) AfterMethod(org.testng.annotations.AfterMethod)

Aggregations

AfterMethod (org.testng.annotations.AfterMethod)74 File (java.io.File)16 MifosPage (org.mifos.test.acceptance.framework.MifosPage)10 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)8 ProtocolStack (org.jgroups.stack.ProtocolStack)6 IOException (java.io.IOException)5 HashSet (java.util.HashSet)4 AtlasVertex (org.apache.atlas.repository.graphdb.AtlasVertex)4 Connection (java.sql.Connection)3 SQLException (java.sql.SQLException)3 MockParticipantManager (org.apache.helix.integration.manager.MockParticipantManager)3 JdbcSession (com.evolveum.midpoint.repo.sqlbase.JdbcSession)2 DispatchManager (com.facebook.presto.dispatcher.DispatchManager)2 OServerAdmin (com.orientechnologies.orient.client.remote.OServerAdmin)2 OStorageProxy (com.orientechnologies.orient.core.storage.OStorageProxy)2 RandomAccessFile (java.io.RandomAccessFile)2 Date (java.util.Date)2 ExecutorService (java.util.concurrent.ExecutorService)2 DeleteIndexRequest (org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest)2 Parameters (org.testng.annotations.Parameters)2