Search in sources :

Example 16 with AfterMethod

use of org.testng.annotations.AfterMethod in project zalenium by zalando.

the class ParallelIT method quitBrowser.

@AfterMethod(alwaysRun = true)
public void quitBrowser(Method method, Object[] testArgs) {
    webDriver.get().quit();
    String browserType = testArgs[0].toString();
    Platform platform = (Platform) testArgs[1];
    LOGGER.info("FINISHING {} on {} - {}", method.getName(), browserType, platform.name());
}
Also used : Platform(org.openqa.selenium.Platform) CoreMatchers.containsString(org.hamcrest.CoreMatchers.containsString) AfterMethod(org.testng.annotations.AfterMethod)

Example 17 with AfterMethod

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

the class TestPartitionMovementThrottle method cleanupTest.

@AfterMethod
public void cleanupTest() throws InterruptedException {
    for (String db : _dbs) {
        _setupTool.dropResourceFromCluster(CLUSTER_NAME, db);
        Thread.sleep(20);
    }
    _dbs.clear();
    Thread.sleep(50);
    for (int i = 0; i < _participants.length; i++) {
        if (_participants[i].isConnected()) {
            _participants[i].syncStop();
        }
        _participants[i] = new MockParticipantManager(ZK_ADDR, CLUSTER_NAME, _participants[i].getInstanceName());
    }
    DelayedTransition.clearThrottleRecord();
}
Also used : MockParticipantManager(org.apache.helix.integration.manager.MockParticipantManager) AfterMethod(org.testng.annotations.AfterMethod)

Example 18 with AfterMethod

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

the class ZkIntegrationTestBase method endTest.

@AfterMethod
public void endTest(Method testMethod, ITestContext testContext) {
    Long startTime = (Long) testContext.getAttribute("StartTime");
    long endTime = System.currentTimeMillis();
    System.out.println("END " + testMethod.getName() + " at " + new Date(endTime) + ", took: " + (endTime - startTime) + "ms.");
}
Also used : Date(java.util.Date) AfterMethod(org.testng.annotations.AfterMethod)

Example 19 with AfterMethod

use of org.testng.annotations.AfterMethod in project rubix by qubole.

the class TestNonLocalReadRequestChain method cleanup.

@AfterMethod
public void cleanup() throws IOException {
    BookKeeperServer.stopServer();
    LocalDataTransferServer.stopServer();
    File mdFile = new File(CacheConfig.getMDFile(backendPath.toString(), conf));
    mdFile.delete();
    File localFile = new File(CacheConfig.getLocalPath(backendPath.toString(), conf));
    localFile.delete();
    backendFile.delete();
}
Also used : File(java.io.File) AfterMethod(org.testng.annotations.AfterMethod)

Example 20 with AfterMethod

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

the class AbstractGraphDatabaseTest method removeVertices.

@AfterMethod
public void removeVertices() {
    for (AtlasVertex vertex : newVertices) {
        if (vertex.exists()) {
            getGraph().removeVertex(vertex);
        }
    }
    getGraph().commit();
    newVertices.clear();
}
Also used : AtlasVertex(org.apache.atlas.repository.graphdb.AtlasVertex) 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