当前位置: 首页>>代码示例>>Java>>正文


Java AfterClass类代码示例

本文整理汇总了Java中org.junit.AfterClass的典型用法代码示例。如果您正苦于以下问题:Java AfterClass类的具体用法?Java AfterClass怎么用?Java AfterClass使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AfterClass类属于org.junit包,在下文中一共展示了AfterClass类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: shutdownTestEnvironment

import org.junit.AfterClass; //导入依赖的package包/类
@AfterClass
public static void shutdownTestEnvironment(){
    //shutdown jmx and service
    ComponentHelper.shutdownService(service);
    //clean up folder
    FileManager.removeAllFilesInDirectory(testSpaceDirectory);
    if(FileManager.countFilesInDirectory(testSpaceDirectoryDirect) > 0){
        //FileManager.removeAllFilesInDirectory(testSpaceDirectoryDirect);
    }else{
        log.log(Level.INFO, "there wasnt any file in the directory, either the writer deleted it already (good) or was there any exception? (bad)");
    }
    if(FileManager.countFilesInDirectory(testSpaceDirectoryNetwork) > 0){
        //FileManager.removeAllFilesInDirectory(testSpaceDirectoryNetwork);
    }else{
        log.log(Level.INFO, "there wasnt any file in the directory, either the writer deleted it already (good) or was there any exception? (bad)");
    }

}
 
开发者ID:deB4SH,项目名称:Byter,代码行数:19,代码来源:CommanderWorkflowTest.java

示例2: cleanupStatic

import org.junit.AfterClass; //导入依赖的package包/类
@AfterClass
   public static void cleanupStatic() {
       if (oldAuthProvider != null) {
           System.setProperty("zookeeper.authProvider.1", oldAuthProvider);
} else {
           System.clearProperty("zookeeper.authProvider.1");
}
oldAuthProvider = null;

       if (oldLoginConfig != null) {
           System.setProperty("java.security.auth.login.config", oldLoginConfig);
} else {
           System.clearProperty("java.security.auth.login.config");
}
oldLoginConfig = null;

       if (oldSuperUser != null) {
           System.setProperty("zookeeper.superUser", oldSuperUser);
} else {
           System.clearProperty("zookeeper.superUser");
}
oldSuperUser = null;
   }
 
开发者ID:didichuxing2,项目名称:https-github.com-apache-zookeeper,代码行数:24,代码来源:SaslSuperUserTest.java

示例3: tearDownClass

import org.junit.AfterClass; //导入依赖的package包/类
@AfterClass
public static void tearDownClass() {
	ServicesHolder.unsetRunnableDeviceService(dService);
	dService = null;

	connector = null;
}
 
开发者ID:eclipse,项目名称:scanning,代码行数:8,代码来源:PositionerAtomProcessTest.java

示例4: afterClass

import org.junit.AfterClass; //导入依赖的package包/类
@AfterClass
public static void afterClass() {
	try {
		if (testEnvironment != null) {
			testEnvironment.destroy();
		}
	} catch (Exception e) {
		// nothing we can do
		e.printStackTrace();
	}
}
 
开发者ID:RJBTechnology,项目名称:rjb-blog-multitenancy,代码行数:12,代码来源:AbstractTest.java

示例5: tearDown

import org.junit.AfterClass; //导入依赖的package包/类
@AfterClass
public static void tearDown() {
    dataService = null;
    billingService = null;
    configurationService = null;
    identityServiceLocal = null;
    basicSetup = null;
    customersPerScenario = null;
    subscriptionCache = null;
    testCache = null;
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:12,代码来源:BillingIntegrationTestBase.java

示例6: stopServer

import org.junit.AfterClass; //导入依赖的package包/类
@AfterClass
public static void stopServer() throws InterruptedException {
    server.shutdown();
    server.awaitTermination();
    channel.shutdown();

    server = null;
    channel = null;
}
 
开发者ID:salesforce,项目名称:reactive-grpc,代码行数:10,代码来源:ReactiveClientStandardServerInteropTest.java

示例7: stopHttpd

import org.junit.AfterClass; //导入依赖的package包/类
@AfterClass
public static void stopHttpd() throws IOException {
    for (int i = 0; i < internalCluster().size(); i++) {
        // shut them all down otherwise we get spammed with connection refused exceptions
        internalCluster().stopRandomDataNode();
    }
    httpServer.stop(0);
    httpServer = null;
    logDir = null;
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:11,代码来源:Ec2DiscoveryClusterFormationTests.java

示例8: clean

import org.junit.AfterClass; //导入依赖的package包/类
@AfterClass
public static void clean() {
    File file = new File(TEST_FILE);
    if (file.exists()) {
        file.delete();
    }
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:8,代码来源:WsdlHandleTaskTest.java

示例9: cleanup

import org.junit.AfterClass; //导入依赖的package包/类
@AfterClass
public static void cleanup() throws Exception {
  server.stop();
  FileUtil.fullyDelete(new File(BASEDIR));
  KeyStoreTestUtil.cleanupSSLConfig(keystoresDir, sslConfDir);
  clientSslFactory.destroy();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:8,代码来源:TestHttpCookieFlag.java

示例10: afterClass

import org.junit.AfterClass; //导入依赖的package包/类
@AfterClass
public static void afterClass() throws Exception {
  if (elastic != null) {
    try {
      elastic.wipe();
      elastic.close();
      elastic = null;
    } catch (Throwable t) {
      logger.error("Error shutting down elasticsearch cluster", t);
      elastic = null;
    }
  }
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:14,代码来源:ElasticBaseTestQuery.java

示例11: tearDown

import org.junit.AfterClass; //导入依赖的package包/类
@AfterClass
public static void tearDown() {
    try {
        if (zkClient != null) {
            zkClient.close();
        }
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
}
 
开发者ID:cbooy,项目名称:cakes,代码行数:11,代码来源:SimpleCRUD.java

示例12: tearDownAfterClass

import org.junit.AfterClass; //导入依赖的package包/类
@AfterClass
public static void tearDownAfterClass() {
    if (em != null) {
        em.close();
    }
    JpaEntityManager.getInstance().close();
}
 
开发者ID:jruesga,项目名称:phoenix-hibernate-dialect,代码行数:8,代码来源:PhoenixDialectTest.java

示例13: bye

import org.junit.AfterClass; //导入依赖的package包/类
@AfterClass
public static void bye() throws Exception {
    // Disable error injection or else the deletion would fail!
    AmazonHttpClient.configUnreliableTestConditions(null);
    client.deleteTable(DeleteTableRequest.builder().tableName(TABLE_NAME).build());
    client.close();
}
 
开发者ID:aws,项目名称:aws-sdk-java-v2,代码行数:8,代码来源:TT0035900619IntegrationTest.java

示例14: tearDownLdapCodecService

import org.junit.AfterClass; //导入依赖的package包/类
/**
 * Shutdown the codec service
 */
@AfterClass
public static void tearDownLdapCodecService()
{
    codec = null;
    encoder = null;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:10,代码来源:AbstractCodecServiceTest.java

示例15: tearDown

import org.junit.AfterClass; //导入依赖的package包/类
@AfterClass
public static void tearDown() {
    if(server != null) {
        try {
            Thread.sleep(100);
        } catch (InterruptedException ignored) {

        }
        server.stop();
        logger.info("The server is stopped.");
    }
}
 
开发者ID:networknt,项目名称:light-graphql-4j,代码行数:13,代码来源:ValidatorHandlerTest.java


注:本文中的org.junit.AfterClass类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。