@After public void teardownEnvironment() { switch(mode) { case CLUSTER: case CLUSTER_OBJECT_REUSE: TestEnvironment.unsetAsContext(); break; case COLLECTION: CollectionTestEnvironment.unsetAsContext(); break; } }
@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); } }
@After public void tearDown() { TestStreamEnvironment.unsetAsContext(); TestEnvironment.unsetAsContext(); }
@AfterClass public static void tearDown() { TestEnvironment.unsetAsContext(); MINI_CLUSTER.closeAsync(); }
@After public void teardownEnvironment() { switch(mode) { case CLUSTER: case CLUSTER_OBJECT_REUSE: TestEnvironment.unsetAsContext(); break; case COLLECTION: CollectionTestEnvironment.unsetAsContext(); break; } }
@After public void teardownEnvironment() { switch(mode) { case CLUSTER: case CLUSTER_OBJECT_REUSE: TestEnvironment.unsetAsContext(); break; case COLLECTION: CollectionTestEnvironment.unsetAsContext(); break; } }
@After public void teardownEnvironment() { switch(mode) { case CLUSTER: case CLUSTER_OBJECT_REUSE: TestEnvironment.unsetAsContext(); break; case COLLECTION: CollectionTestEnvironment.unsetAsContext(); break; } }
@After public void teardownEnvironment() { switch(mode) { case CLUSTER: case CLUSTER_OBJECT_REUSE: TestEnvironment.unsetAsContext(); break; case COLLECTION: CollectionTestEnvironment.unsetAsContext(); break; } }
@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); } }
TestEnvironment.unsetAsContext();
TestEnvironment.unsetAsContext();
@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); } }