@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)"); } }
@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; }
@AfterClass public static void tearDownClass() { ServicesHolder.unsetRunnableDeviceService(dService); dService = null; connector = null; }
@AfterClass public static void afterClass() { try { if (testEnvironment != null) { testEnvironment.destroy(); } } catch (Exception e) { // nothing we can do e.printStackTrace(); } }
@AfterClass public static void tearDown() { dataService = null; billingService = null; configurationService = null; identityServiceLocal = null; basicSetup = null; customersPerScenario = null; subscriptionCache = null; testCache = null; }
@AfterClass public static void stopServer() throws InterruptedException { server.shutdown(); server.awaitTermination(); channel.shutdown(); server = null; channel = null; }
@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; }
@AfterClass public static void clean() { File file = new File(TEST_FILE); if (file.exists()) { file.delete(); } }
@AfterClass public static void cleanup() throws Exception { server.stop(); FileUtil.fullyDelete(new File(BASEDIR)); KeyStoreTestUtil.cleanupSSLConfig(keystoresDir, sslConfDir); clientSslFactory.destroy(); }
@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; } } }
@AfterClass public static void tearDown() { try { if (zkClient != null) { zkClient.close(); } } catch (InterruptedException e) { e.printStackTrace(); } }
@AfterClass public static void tearDownAfterClass() { if (em != null) { em.close(); } JpaEntityManager.getInstance().close(); }
@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(); }
/** * Shutdown the codec service */ @AfterClass public static void tearDownLdapCodecService() { codec = null; encoder = null; }
@AfterClass public static void tearDown() { if(server != null) { try { Thread.sleep(100); } catch (InterruptedException ignored) { } server.stop(); logger.info("The server is stopped."); } }
@AfterClass public static void cleanupQuery() throws SQLException { if (resultSet != null) { resultSet.close(); } if (connection != null) { connection.close(); } }
/** * Clear up after all the tests have finished and dereference the application context to allow it to be garbage * collected. */ @AfterClass public static void tidyAfterTestClass() { ApplicationContextHelper.closeApplicationContext(); applicationContext = null; }
@AfterClass public static void tearDown() { if (mrCluster != null) { mrCluster.stop(); mrCluster = null; } }
@AfterClass public static void afterClass() throws IOException { // clean up cmd log folder Stream<Path> list = Files.list(CMD_LOG_DIR); list.forEach(path -> { try { Files.deleteIfExists(path); } catch (IOException e) { e.printStackTrace(); } }); }
@AfterClass public static void after() { StringBuilder tBuffer = new StringBuilder(); if (!cLoadedOk) { return; } System.out.println(""); cLoadedOk = false; try { if (cErrors.isEmpty()) { System.out.println("Found no errors\n"); } else { tBuffer.append(("Found " + cErrors.size() + " errors:\n")); Collections.sort(cErrors); for (String tError : cErrors) { tBuffer.append(" ").append(tError).append("\n"); } System.out.println(tBuffer.toString()); } tBuffer.setLength(0); if (cWarnings.isEmpty()) { System.out.println("Found no warnings\n"); } else { tBuffer.append(("Found " + cWarnings.size() + " warnings:\n")); Collections.sort(cWarnings); for (String tWarning : cWarnings) { tBuffer.append(" ").append(tWarning).append("\n"); } System.out.println(tBuffer.toString()); } } catch (Exception e) { //TODO: handle io problems } if (!cErrors.isEmpty()) { Assert.fail(); } }
@AfterClass public static void Cleanup() { /* try { FileUtils.deleteDirectory(new File(scriptsPath)); } catch (IOException e) { } */ }
@AfterClass public static void endTest(){ service.shutdown(); ThreadManager.nap(1000); //wait for the service to shutdown properly if(!service.isShutdown()){ service.shutdownNow(); //still running? killing it not softly it is! } ThreadManager.nap(1000); }
@AfterClass public static void tearDownSetup() throws Exception { associateRESTServerWithDB(restServer,"Documents"); for (int i =0 ; i < hostNames.length; i++){ detachForest(dbName, dbName+"-"+(i+1)); deleteForest(dbName+"-"+(i+1)); } deleteDB(dbName); }
@AfterClass public static void teardown() { JavaTestKit.shutdownActorSystem(node1); JavaTestKit.shutdownActorSystem(node2); node1 = null; node2 = null; }
/** * すべてのテスト完了時に実行される処理. */ @AfterClass public static void afterClass() { }
@AfterClass public static void afterClass() throws Exception { TEST_UTIL.shutdownMiniZKCluster(); }
@AfterClass public static void cleanup() { SystemProperties.resetToDefault(); }
@AfterClass public static void tearDownAfterClass() throws Exception { }
@AfterClass public static void shutdown() { server.stop(); }
@AfterClass public static void tearDown() throws Exception { shutDownTomcat(); }
@AfterClass public static void shutdown() throws Exception { DIRECTORY.close(); }
@AfterClass public static void tearDownClass() { counter = null; invocations = null; ThreeRules.ruleListStatic = null; }
@AfterClass public static void resetDefaults() throws Exception { testQuery(String.format("alter session set `%s` = false", PlannerSettings.ENABLE_DECIMAL_DATA_TYPE_KEY)); }
@AfterClass public static void cleanup() throws Exception { if (server != null && server.isAlive()) { server.stop(); } }
@AfterClass public static void tearDownClass() throws Exception { }
@AfterClass public static void afterClass() throws Exception { UTIL.shutdownMiniCluster(); }
@AfterClass public static void tearDownAfterClass() throws Exception { UTIL.shutdownMiniCluster(); }
@AfterClass public static void tearDown() throws Exception { stopServer(); File f = new File(testjar); f.delete(); }
@AfterClass public static void tearDownAfterClass() throws Exception { TEST_UTIL.cleanupTestDir(); }