org.junit.AfterClass Java Examples
The following examples show how to use
org.junit.AfterClass.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TestOzoneAtRestEncryption.java From hadoop-ozone with Apache License 2.0 | 6 votes |
/** * Close OzoneClient and shutdown MiniOzoneCluster. */ @AfterClass public static void shutdown() throws IOException { if(ozClient != null) { ozClient.close(); } if (storageContainerLocationClient != null) { storageContainerLocationClient.close(); } if (cluster != null) { cluster.shutdown(); } if (miniKMS != null) { miniKMS.stop(); } }
Example #2
Source File: YARNHighAvailabilityITCase.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@AfterClass public static void teardown() throws Exception { if (zkServer != null) { zkServer.stop(); zkServer = null; } }
Example #3
Source File: PythonInterpreterTest.java From submarine with Apache License 2.0 | 5 votes |
@AfterClass public static void tearDown() throws InterpreterException { if (null != pythonInterpreterForCancel) { pythonInterpreterForCancel.close(); } if (null != pythonInterpreterForClose) { pythonInterpreterForClose.close(); } }
Example #4
Source File: MetadataClientTest.java From Quicksql with MIT License | 5 votes |
/** * close resource. */ @AfterClass public static void close() { if (client != null) { client.close(); } }
Example #5
Source File: AkkaRpcServiceTest.java From flink with Apache License 2.0 | 5 votes |
@AfterClass public static void shutdown() throws InterruptedException, ExecutionException, TimeoutException { final CompletableFuture<Void> rpcTerminationFuture = akkaRpcService.stopService(); final CompletableFuture<Terminated> actorSystemTerminationFuture = FutureUtils.toJava(actorSystem.terminate()); FutureUtils .waitForAll(Arrays.asList(rpcTerminationFuture, actorSystemTerminationFuture)) .get(TIMEOUT.toMilliseconds(), TimeUnit.MILLISECONDS); actorSystem = null; akkaRpcService = null; }
Example #6
Source File: AsyncCallsTest.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@AfterClass public static void shutdown() throws InterruptedException, ExecutionException, TimeoutException { final CompletableFuture<Void> rpcTerminationFuture = akkaRpcService.stopService(); final CompletableFuture<Terminated> actorSystemTerminationFuture = FutureUtils.toJava(actorSystem.terminate()); FutureUtils .waitForAll(Arrays.asList(rpcTerminationFuture, actorSystemTerminationFuture)) .get(timeout.toMilliseconds(), TimeUnit.MILLISECONDS); }
Example #7
Source File: MultiFrameIntegrationTest.java From data-highway with Apache License 2.0 | 5 votes |
@AfterClass public static void afterClass() { if (context != null) { context.close(); context = null; } }
Example #8
Source File: StringWriterTest.java From flink with Apache License 2.0 | 5 votes |
@AfterClass public static void destroyHDFS() { if (hdfsCluster != null) { hdfsCluster.shutdown(); hdfsCluster = null; } }
Example #9
Source File: LoadBalanceTest.java From grpc-nebula-java with Apache License 2.0 | 5 votes |
@AfterClass public static void tearDown() throws Exception { fisrtServer.stop(); secondServer.stop(); if (zkService != null) { zkService.releaseRegistry(); } TestProjectPropertyUtils.recoverUserDir(); }
Example #10
Source File: ShardingDatabaseOnlyTest.java From sharding-jdbc-1.5.1 with Apache License 2.0 | 5 votes |
@AfterClass public static void clear() { isShutdown = true; if (!shardingDataSources.isEmpty()) { for (ShardingDataSource each : shardingDataSources.values()) { each.close(); } } }
Example #11
Source File: MetastoreClientIndexIntegrationTest.java From aws-glue-data-catalog-client-for-apache-hive-metastore with Apache License 2.0 | 5 votes |
@AfterClass public static void cleanUp() { List<com.amazonaws.services.glue.model.Table> table_to_delete = new ArrayList<>(); String token = null; do { GetTablesResult result = glueClient.getTables(new GetTablesRequest().withDatabaseName( catalogDB.getName()).withNextToken(token)); table_to_delete.addAll(result.getTableList()); token = result.getNextToken(); } while(token != null); for(com.amazonaws.services.glue.model.Table table : table_to_delete) { glueClient.deleteTable(new DeleteTableRequest().withDatabaseName(catalogDB.getName()).withName(table.getName())); } glueClient.deleteDatabase(new DeleteDatabaseRequest().withName(catalogDB.getName())); }
Example #12
Source File: KvStateServerTest.java From flink with Apache License 2.0 | 5 votes |
@AfterClass public static void tearDown() throws Exception { if (NIO_GROUP != null) { // note: no "quiet period" to not trigger Netty#4357 NIO_GROUP.shutdownGracefully(0, 10, TimeUnit.SECONDS); } }
Example #13
Source File: TestGribIndexCreation.java From netcdf-java with BSD 3-Clause "New" or "Revised" License | 5 votes |
@AfterClass static public void after() { Grib.setDebugFlags(new DebugFlagsImpl()); Formatter out = new Formatter(System.out); FileCacheIF cache = GribCdmIndex.gribCollectionCache; if (show && cache != null) { cache.showTracking(out); cache.showCache(out); cache.clearCache(false); } FileCacheIF rafCache = RandomAccessFile.getGlobalFileCache(); if (show && rafCache != null) { rafCache.showCache(out); } System.out.printf(" countGC=%7d%n", GribCollectionImmutable.countGC); System.out.printf(" countPC=%7d%n", PartitionCollectionImmutable.countPC); System.out.printf(" countDataAccess=%7d%n", GribIosp.debugIndexOnlyCount); System.out.printf(" total files needed=%7d%n", GribCollectionImmutable.countGC + PartitionCollectionImmutable.countPC + GribIosp.debugIndexOnlyCount); FileCache.shutdown(); RandomAccessFile.setGlobalFileCache(null); TestDir.checkLeaks(); RandomAccessFile.setDebugLeaks(false); }
Example #14
Source File: UnboundedFeedbackLoggerTest.java From stateful-functions with Apache License 2.0 | 5 votes |
@AfterClass public static void afterClass() throws Exception { if (IO_MANAGER != null) { IO_MANAGER.close(); IO_MANAGER = null; } }
Example #15
Source File: LoadBalanceModeTest.java From grpc-nebula-java with Apache License 2.0 | 5 votes |
@AfterClass public static void tearDown() throws Exception { fisrtServer.stop(); secondServer.stop(); if (zkService != null) { zkService.releaseRegistry(); } TestProjectPropertyUtils.recoverUserDir(); }
Example #16
Source File: TestCloseContainerHandlingByClient.java From hadoop-ozone with Apache License 2.0 | 5 votes |
/** * Shutdown MiniDFSCluster. */ @AfterClass public static void shutdown() { if (cluster != null) { cluster.shutdown(); } }
Example #17
Source File: TestBlockOutputStream.java From hadoop-ozone with Apache License 2.0 | 5 votes |
/** * Shutdown MiniDFSCluster. */ @AfterClass public static void shutdown() { if (cluster != null) { cluster.shutdown(); } }
Example #18
Source File: TestDeleteWithSlowFollower.java From hadoop-ozone with Apache License 2.0 | 5 votes |
/** * Shutdown MiniDFSCluster. */ @AfterClass public static void shutdown() { if (cluster != null) { cluster.shutdown(); } }
Example #19
Source File: QuarantineMonitorTest.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@AfterClass public static void tearDown() throws InterruptedException, TimeoutException { if (actorSystem1 != null) { actorSystem1.terminate(); Await.ready(actorSystem1.whenTerminated(), Duration.Inf()); } }
Example #20
Source File: TestOmAcls.java From hadoop-ozone with Apache License 2.0 | 5 votes |
/** * Shutdown MiniDFSCluster. */ @AfterClass public static void shutdown() { if (cluster != null) { cluster.shutdown(); } }
Example #21
Source File: ConsumerStatusSubCommandTest.java From rocketmq-read with Apache License 2.0 | 4 votes |
@AfterClass public static void terminate() { defaultMQAdminExt.shutdown(); }
Example #22
Source File: EpollSocketTcpMd5Test.java From netty-4.1.22 with Apache License 2.0 | 4 votes |
@AfterClass public static void afterClass() { GROUP.shutdownGracefully(); }
Example #23
Source File: SearchServiceTestCase.java From airsonic-advanced with GNU General Public License v3.0 | 4 votes |
@AfterClass public static void cleanup() { AbstractAirsonicHomeTest.cleanup(cleanupId); cleanupId = null; }
Example #24
Source File: WipeWritePermSubCommandTest.java From rocketmq-read with Apache License 2.0 | 4 votes |
@AfterClass public static void terminate() { defaultMQAdminExt.shutdown(); }
Example #25
Source File: ZipCompressionProviderTest.java From hop with Apache License 2.0 | 4 votes |
@AfterClass public static void tearDownAfterClass() throws Exception { }
Example #26
Source File: ProxyHandlerTest.java From netty-4.1.22 with Apache License 2.0 | 4 votes |
@AfterClass public static void stopServers() { for (ProxyServer p: allProxies) { p.stop(); } }
Example #27
Source File: GCloudUnitTestBase.java From flink with Apache License 2.0 | 4 votes |
@AfterClass public static void terminateGCloudEmulator() throws DockerException, InterruptedException { GCloudEmulatorManager.terminateDocker(); }
Example #28
Source File: TupleExpressionTest.java From kylin-on-parquet-v2 with Apache License 2.0 | 4 votes |
@AfterClass public static void after() throws Exception { staticCleanupTestMetadata(); }
Example #29
Source File: WebRequestDataBinderIntegrationTests.java From java-technology-stack with MIT License | 4 votes |
@AfterClass public static void stopJettyServer() throws Exception { if (jettyServer != null) { jettyServer.stop(); } }
Example #30
Source File: ZooKeeperCompletedCheckpointStoreITCase.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@AfterClass public static void tearDown() throws Exception { if (ZOOKEEPER != null) { ZOOKEEPER.shutdown(); } }