Search in sources :

Example 71 with AfterMethod

use of org.testng.annotations.AfterMethod in project JGroups by belaban.

the class MergeTest2 method tearDown.

@AfterMethod
void tearDown() throws Exception {
    for (JChannel ch : new JChannel[] { a, b, c, d }) {
        ProtocolStack stack = ch.getProtocolStack();
        String cluster_name = ch.getClusterName();
        GMS gms = stack.findProtocol(GMS.class);
        if (gms != null)
            gms.setLevel("warn");
        stack.stopStack(cluster_name);
        stack.destroy();
    }
}
Also used : ProtocolStack(org.jgroups.stack.ProtocolStack) GMS(org.jgroups.protocols.pbcast.GMS) AfterMethod(org.testng.annotations.AfterMethod)

Example 72 with AfterMethod

use of org.testng.annotations.AfterMethod in project Payara by payara.

the class ElementStarTest method after.

@AfterMethod
public void after() {
    // TODO: This url should be fixed
    Response response = delete("/domain/servers/server/" + instanceName1 + "/delete-instance");
    checkStatusForSuccess(response);
    response = delete("/domain/servers/server/" + instanceName2 + "/delete-instance");
    checkStatusForSuccess(response);
}
Also used : Response(javax.ws.rs.core.Response) AfterMethod(org.testng.annotations.AfterMethod)

Example 73 with AfterMethod

use of org.testng.annotations.AfterMethod in project athenz by yahoo.

the class InstanceProviderManagerTest method shutdown.

@AfterMethod
public void shutdown() {
    ZTSTestUtils.deleteDirectory(new File(ZTS_DATA_STORE_PATH));
    System.clearProperty(ZTSConsts.ZTS_PROP_PROVIDER_ENDPOINTS);
}
Also used : File(java.io.File) AfterMethod(org.testng.annotations.AfterMethod)

Example 74 with AfterMethod

use of org.testng.annotations.AfterMethod in project functional-tests by NativeScript.

the class SdkBaseTest method afterSdkBaseTestMethod.

@AfterMethod(alwaysRun = true)
public void afterSdkBaseTestMethod(ITestResult result) {
    if (result.getStatus() == ITestResult.SKIP) {
        result.setStatus(ITestResult.FAILURE);
        this.log.info("Set test result from SKIP to FAILURE.");
    }
    try {
        UIElement btnBack = this.mainPage.btnBack();
        if (btnBack != null) {
            this.mainPage.navigateBack(btnBack);
        } else {
            this.mainPage.navigateBack();
        }
    } catch (Exception ex) {
        this.log.error(ex.getMessage());
        result.setStatus(ITestResult.FAILURE);
    }
}
Also used : UIElement(functional.tests.core.mobile.element.UIElement) 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