类org.testng.annotations.AfterMethod源码实例Demo

下面列出了怎么用org.testng.annotations.AfterMethod的API类实例代码及写法,或者点击链接到github查看源代码。

@AfterMethod(groups = "wso2.esb")
public void startServersA() throws InterruptedException, IOException {
    if (!axis2Server1.isStarted()) {
        axis2Server1.start();
    }
    if (!axis2Server2.isStarted()) {
        axis2Server2.start();
    }
    if (!axis2Server3.isStarted()) {
        axis2Server3.start();
    }
    Thread.sleep(1000);
}
 
@AfterMethod(groups = "wso2.esb")
public void startServersA() throws InterruptedException, IOException {
    if (!axis2Server1.isStarted()) {
        axis2Server1.start();
    }
    if (!axis2Server2.isStarted()) {
        axis2Server2.start();
    }
    if (!axis2Server3.isStarted()) {
        axis2Server3.start();
    }
    Thread.sleep(1000);
}
 
@AfterMethod
void tearDown() throws Exception {
	numTearDownCalls++;
	if (inTransaction()) {
		numTearDownCallsInTransaction++;
	}
	assertNumRowsInPersonTable((inTransaction() ? 4 : 1), "after a test method");
}
 
源代码4 项目: TencentKona-8   文件: TestHarness.java
@AfterMethod
public void printError(ITestResult result) {
    if (result.getStatus() == ITestResult.FAILURE) {
        String clsName = result.getTestClass().getName();
        clsName = clsName.substring(clsName.lastIndexOf(".") + 1);
        System.out.println("Test " + clsName + "." +
                           result.getName() + " FAILED");
    }
}
 
源代码5 项目: presto   文件: TestMergeOperator.java
@AfterMethod(alwaysRun = true)
public void tearDown()
{
    serdeFactory = null;
    orderingCompiler = null;

    httpClient.close();
    httpClient = null;

    executor.shutdownNow();
    executor = null;

    exchangeClientFactory.stop();
    exchangeClientFactory = null;
}
 
源代码6 项目: kop   文件: GroupMetadataManagerTest.java
@AfterMethod
@Override
public void cleanup() throws Exception {
    if (groupMetadataManager != null) {
        groupMetadataManager.shutdown();
    }
    scheduler.shutdown();
    super.internalCleanup();
}
 
@AfterMethod
void tearDown() throws Exception {
	numTearDownCalls++;
	if (inTransaction()) {
		numTearDownCallsInTransaction++;
	}
	assertNumRowsInPersonTable((inTransaction() ? 4 : 1), "after a test method");
}
 
源代码8 项目: dragonwell8_jdk   文件: LoggingTestCase.java
@AfterMethod
public void after(ITestResult result) {
    if (!result.isSuccess()) {
        List<Object> list = new ArrayList<>();
        Collections.addAll(list, result.getParameters());
        list.add(context.toString());
        result.setParameters(list.toArray(new Object[list.size()]));
    }
}
 
源代码9 项目: presto   文件: TestShardCompactor.java
@AfterMethod(alwaysRun = true)
public void tearDown()
        throws Exception
{
    if (dummyHandle != null) {
        dummyHandle.close();
    }
    deleteRecursively(temporary.toPath(), ALLOW_INSECURE);
}
 
@AfterMethod
void tearDown() {
	numTearDownCalls++;
	if (inTransaction()) {
		numTearDownCallsInTransaction++;
	}
	assertNumRowsInPersonTable((inTransaction() ? 4 : 1), "after a test method");
}
 
源代码11 项目: presto   文件: TestShardCleaner.java
@AfterMethod(alwaysRun = true)
public void teardown()
        throws IOException
{
    if (dummyHandle != null) {
        dummyHandle.close();
    }
    deleteRecursively(temporary.toPath(), ALLOW_INSECURE);
}
 
源代码12 项目: presto   文件: TestDatabaseShardManager.java
@AfterMethod(alwaysRun = true)
public void teardown()
        throws IOException
{
    dummyHandle.close();
    deleteRecursively(dataDir.toPath(), ALLOW_INSECURE);
}
 
源代码13 项目: presto   文件: TestRaptorSplitManager.java
@AfterMethod(alwaysRun = true)
public void teardown()
        throws IOException
{
    dummyHandle.close();
    deleteRecursively(temporary.toPath(), ALLOW_INSECURE);
}
 
源代码14 项目: presto   文件: TestJdbcWarnings.java
@AfterMethod(alwaysRun = true)
public void teardown()
{
    closeQuietly(statement);
    closeQuietly(connection);
    executor.shutdownNow();
}
 
源代码15 项目: presto   文件: TestBinaryFileSpiller.java
@AfterMethod(alwaysRun = true)
public void tearDown()
        throws Exception
{
    singleStreamSpillerFactory.destroy();
    deleteRecursively(spillPath.toPath(), ALLOW_INSECURE);
}
 
源代码16 项目: presto   文件: TestWindowOperator.java
@AfterMethod(alwaysRun = true)
public void tearDown()
{
    executor.shutdownNow();
    scheduledExecutor.shutdownNow();
    spillerFactory = null;
}
 
源代码17 项目: presto   文件: TestBucketBalancer.java
@AfterMethod(alwaysRun = true)
public void teardown()
{
    if (dummyHandle != null) {
        dummyHandle.close();
    }
}
 
源代码18 项目: presto   文件: TestCompletedEventWarnings.java
@AfterMethod(alwaysRun = true)
public void tearDown()
{
    queryRunner.close();
    queryRunner = null;
    generatedEvents = null;
}
 
源代码19 项目: TencentKona-8   文件: JavacTemplateTestBase.java
@AfterMethod
public void copyErrors(ITestResult result) {
    if (!result.isSuccess()) {
        suiteErrors.addAll(diags.errorKeys());

        List<Object> list = new ArrayList<>();
        Collections.addAll(list, result.getParameters());
        list.add("Test case: " + getTestCaseDescription());
        for (Pair<String, Template> e : sourceFiles)
            list.add("Source file " + e.fst + ": " + e.snd);
        if (diags.errorsFound())
            list.add("Compile diagnostics: " + diags.toString());
        result.setParameters(list.toArray(new Object[list.size()]));
    }
}
 
@AfterMethod(alwaysRun = true)
public void undeployProxyService() throws Exception {
    super.cleanup();
    super.init();
}
 
源代码21 项目: kop   文件: PublishRateLimitTest.java
@AfterMethod
@Override
protected void cleanup() throws Exception {
    super.internalCleanup();
}
 
源代码22 项目: smallrye-mutiny   文件: UniOnItemDelayTest.java
@AfterMethod
public void shutdown() {
    executor.shutdown();
}
 
源代码23 项目: constellation   文件: SelectPendantsNGTest.java
@AfterMethod
public void tearDownMethod() throws Exception {
}
 
源代码24 项目: presto   文件: TestPrioritizedFifoExecutor.java
@AfterMethod(alwaysRun = true)
public void tearDown()
{
    executor.shutdownNow();
}
 
源代码25 项目: constellation   文件: SelectAllNGTest.java
@AfterMethod
public void tearDownMethod() throws Exception {
}
 
源代码26 项目: constellation   文件: SelectBlazesPluginNGTest.java
@AfterMethod
public void tearDownMethod() throws Exception {
    graph = null;
}
 
源代码27 项目: presto   文件: TestShardMetadataRecordCursor.java
@AfterMethod(alwaysRun = true)
public void teardown()
{
    dummyHandle.close();
}
 
源代码28 项目: presto   文件: TestJdbcResultSet.java
@AfterMethod(alwaysRun = true)
public void teardown()
{
    closeQuietly(statement);
    closeQuietly(connection);
}
 
@AfterMethod(alwaysRun = true)
public void synchronizePersistenceContext() {
	em.flush();
}
 
源代码30 项目: constellation   文件: HopOneNGTest.java
@AfterMethod
public void tearDownMethod() throws Exception {
    graph = null;
}