/** * Close the client and release all resources. * Call the handler when close is complete. * @param handler the handler that will be called when close is complete */ public void close(Handler<AsyncResult<Void>> handler) { delegate.close(handler); }
/** * Close the client */ public void close() { delegate.close(); }
/** * Close the client */ public void close() { delegate.close(); }
/** * Close the client and release all resources. * Call the handler when close is complete. * @param handler the handler that will be called when close is complete */ public void close(Handler<AsyncResult<Void>> handler) { delegate.close(handler); }
@Override public void close(Handler<AsyncResult<Void>> handler) { delegate.close(handler); }
@Override protected void tearDown() throws Exception { client.close(); super.tearDown(); }
public void after() throws Exception { if (client != null) { client.close(); } super.after(); }
@Override public void run() { for (int i = 0;i < iter;i++) { count.incrementAndGet(); SQLClient client = JDBCClient.createShared(vertx, config); client.close(); } } };
@After public void after() throws Exception { client.close(); try (Connection conn = DriverManager.getConnection(config.getString("url"))) { try (Statement statement = conn.createStatement()) { statement.execute("SHUTDOWN"); } } super.after(); }
@After public void after() throws Exception { client.close(); super.after(); }
@After public void after() throws Exception { client.close(); super.after(); }
@After public void after() throws Exception { client.close(); super.after(); }
@After public void after() throws Exception { client.close(); super.after(); }
@After public void after() throws Exception { client.close(); super.after(); }
@After public void after() throws Exception { client.close(); super.after(); }
@After public void after() throws Exception { client.close(); super.after(); }
@Test public void testLifecycle() { Map<String, PoolMetrics> metricsMap = FakePoolMetrics.getPoolMetrics(); assertEquals(Collections.emptySet(), metricsMap.keySet()); client = getClient(); assertEquals(1, metricsMap.size()); assertEquals(10, metrics.getPoolSize()); client.close(); client = null; assertEquals(0, metricsMap.size()); }
@After public void cleanup(TestContext context) { if (conn != null) { conn.close(context.asyncAssertSuccess()); } if (client != null) { client.close(context.asyncAssertSuccess()); } }
@After public void cleanup(TestContext context) { if (conn != null) { conn.close(context.asyncAssertSuccess()); } if (client != null) { client.close(context.asyncAssertSuccess()); } }
@After public void cleanup(TestContext context) { if (conn != null) { conn.close(context.asyncAssertSuccess()); } if (client != null) { client.close(context.asyncAssertSuccess()); } }