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);
}
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");
}
}
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();
}
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");
}
}
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();
}
}
Aggregations