@Override public void after() { TestStreamEnvironment.unsetAsContext(); TestEnvironment.unsetAsContext(); Exception exception = null; if (clusterClient != null) { try { clusterClient.shutdown(); } catch (Exception e) { exception = e; } } clusterClient = null; super.after(); if (exception != null) { log.warn("Could not properly shut down the MiniClusterWithClientResource.", exception); } }
@AfterClass public static void shutDownServices() throws Exception { LOG.info("-------------------------------------------------------------------------"); LOG.info(" Shut down KafkaTestBase "); LOG.info("-------------------------------------------------------------------------"); TestStreamEnvironment.unsetAsContext(); shutdownClusters(); LOG.info("-------------------------------------------------------------------------"); LOG.info(" KafkaTestBase finished"); LOG.info("-------------------------------------------------------------------------"); }
@After public void tearDown() { TestStreamEnvironment.unsetAsContext(); TestEnvironment.unsetAsContext(); }
@AfterClass public static void teardown() throws Exception { LOG.info("In StreamingMultipleProgramsTestBase: Closing FlinkMiniCluster "); TestStreamEnvironment.unsetAsContext(); stopCluster(cluster, TestBaseUtils.DEFAULT_TIMEOUT); } }
@Override protected void executeEnvironment() throws Throwable { TestStreamEnvironment.setAsContext(executor, parallelism); try { execute(); } finally { TestStreamEnvironment.unsetAsContext(); } } };
@Override protected void executeEnvironment() throws Throwable { TestStreamEnvironment.setAsContext(cluster, parallelism); try { execute(); } finally { TestStreamEnvironment.unsetAsContext(); } } };
@Override public void after() { TestStreamEnvironment.unsetAsContext(); TestEnvironment.unsetAsContext(); Exception exception = null; if (clusterClient != null) { try { clusterClient.shutdown(); } catch (Exception e) { exception = e; } } clusterClient = null; super.after(); if (exception != null) { log.warn("Could not properly shut down the MiniClusterWithClientResource.", exception); } }
@Override public void after() { TestStreamEnvironment.unsetAsContext(); TestEnvironment.unsetAsContext(); Exception exception = null; if (clusterClient != null) { try { clusterClient.shutdown(); } catch (Exception e) { exception = e; } } clusterClient = null; super.after(); if (exception != null) { log.warn("Could not properly shut down the MiniClusterWithClientResource.", exception); } }
TestStreamEnvironment.unsetAsContext();
@AfterClass public static void afterClass() throws Exception { TestStreamEnvironment.unsetAsContext(); flinkCluster.close(); }
@Override public void after() { temporaryFolder.delete(); TestStreamEnvironment.unsetAsContext(); TestEnvironment.unsetAsContext(); Exception exception = null; if (clusterClient != null) { try { clusterClient.shutdown(); } catch (Exception e) { exception = e; } } clusterClient = null; final CompletableFuture<?> terminationFuture = jobExecutorService.closeAsync(); try { terminationFuture.get( miniClusterResourceConfiguration.getShutdownTimeout().toMilliseconds(), TimeUnit.MILLISECONDS); } catch (Exception e) { exception = ExceptionUtils.firstOrSuppressed(e, exception); } jobExecutorService = null; if (exception != null) { LOG.warn("Could not properly shut down the MiniClusterResource.", exception); } }