當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。