@Override public void close() throws InterruptedException { try { server.close(); } catch (IOException e) { throw new RuntimeException(e); } stop(); deleteQuietly(dataDir); }
protected void tearDownServerAndCurator() { try { curator.close(); server.close(); } catch (IOException ex) { throw new RuntimeException(ex); } }
void stop() throws IOException { log.debug("Shutting down embedded ZooKeeper server at {} ...", server.getConnectString()); server.close(); log.debug("Shutdown of embedded ZooKeeper server at {} completed", server.getConnectString()); }
@AfterClass public void tearDown() throws IOException { if (testingServer != null) { testingServer.close(); } } }
@Override @AfterClass public void tearDown() throws IOException { if (testingServer != null) { testingServer.close(); } } }
@AfterClass public static void tearDown() throws Exception { if (zkServer != null) { zkServer.close(); zkServer = null; } }
@After public void teardown() throws Exception { client.close(); server.close(); server = null; }
@AfterClass public void tearDown() throws IOException { try { this.gobblinClusterManager.disconnectHelixManager(); this.gobblinTaskRunner.disconnectHelixManager(); } finally { this.testingZKServer.close(); } } }
try { zookeeper.stop(); zookeeper.close();
public void shutdownCluster() throws InterruptedException, IOException { this.workers.forEach(runner->runner.stop()); this.taskDrivers.forEach(runner->runner.stop()); this.manager.stop(); this.testingZKServer.close(); }
@AfterClass public void tearDown() throws Exception { try { if (this.helixManager.isConnected()) { this.helixManager.disconnect(); } this.gobblinClusterManager.disconnectHelixManager(); } catch (Throwable t) { Assert.fail(); } finally { this.testingZKServer.close(); } }
@AfterClass public static void tearDown() throws Exception { miniClusterResource.after(); zkServer.stop(); zkServer.close(); }
@AfterClass public static void tearDown() throws Exception { miniClusterResource.after(); client.shutdownAndWait(); zkServer.stop(); zkServer.close(); }
@AfterClass public static void tearDown() throws Exception { miniClusterResource.after(); client.shutdownAndWait(); zkServer.stop(); zkServer.close(); }
@AfterClass public void tearDown() throws IOException { zkJobStateStore.delete(TEST_JOB_NAME); zkDatasetStateStore.delete(TEST_JOB_NAME); zkJobStateStore.delete(TEST_JOB_NAME2); zkDatasetStateStore.delete(TEST_JOB_NAME2); if (testingServer != null) { testingServer.close(); } } }
public void tearDown() throws Exception { kafkaAdminClient.close(); closeProducer(); kafkaServer.shutdown(); kafkaDir.close(); zookeeper.close(); }
public void testD2Client() throws Exception { R2ClientFactory factory = new R2ClientFactory(R2ClientFactory.Schema.D2); TestingServer zkServer = new TestingServer(-1); Map<String, Object> values = new HashMap<>(); values.put("d2.zkHosts", zkServer.getConnectString()); // No SSL Client client = factory.createInstance(ConfigFactory.parseMap(values)); shutdown(client); // With SSL final String confPrefix = "d2."; values.put(confPrefix + R2ClientFactory.SSL_ENABLED, true); values.put(confPrefix + SSLContextFactory.KEY_STORE_FILE_PATH, "identity.p12"); values.put(confPrefix + SSLContextFactory.TRUST_STORE_FILE_PATH, "certs"); values.put(confPrefix + SSLContextFactory.KEY_STORE_PASSWORD, "keyStorePassword"); values.put(confPrefix + SSLContextFactory.TRUST_STORE_PASSWORD, "trustStorePassword"); values.put(confPrefix + SSLContextFactory.KEY_STORE_TYPE, "PKCS12"); try { factory.createInstance(ConfigFactory.parseMap(values)); } catch (ConfigException | IllegalArgumentException e) { Assert.fail("Unexpected config exception"); } catch (Exception e) { // OK } zkServer.close(); }
@AfterMethod public void tearDown() throws IOException, InterruptedException { for (int i = 0; i < NUM_MANAGERS; i++) { _clusterManagers[i].multiManager.connect(); if (!_clusterManagers[i].isHelixManagerConnected()) { _clusterManagers[i].connectHelixManager(); } _clusterManagers[i].stop(); } for (int i = 0; i < NUM_WORKERS; i++) { _clusterWorkers[i].stop(); } for (int i = 0; i < NUM_WORKERS; i++) { _workerStartThreads[i].join(); } _testingZKServer.close(); }
this.testingZKServer.close(); } catch (Exception e) { logger.warn("Could not cleanly stop Testing Zookeeper", e);
testingServer.close();