@Override protected void after() { try { this.server.stop(); } catch (Exception e) { if (!suppressExceptions) { throw e; } } } }
@Override protected void after() { redisServer.stop(); }
@Override public void close() { jedisPool.destroy(); try { redisServer.stop(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new RuntimeException(e); } }
@AfterSuite(alwaysRun = true) public void globalAfterSuite() { if (redissonClient != null) { redissonClient.shutdown(); } if (redisServer != null) { redisServer.stop(); } }
@PreDestroy public void destroy() { this.redisServer.stop(); } }
@PreDestroy public void destroy() { this.redisServer.stop(); } }
@AfterMethod public void tearDown() throws Exception { if (embeddedRedisServer != null) { embeddedRedisServer.stop(); embeddedRedisServer = null; } }
@AfterMethod public void tearDown() throws Exception { if (redisClient != null) { redisClient.close(); redisClient = null; } if (embeddedRedisServer != null) { embeddedRedisServer.stop(); embeddedRedisServer = null; } _tomcat1.stop(); }
@Test public void testAutoReconnect() throws Exception { RedisStorageClient client = createClient(); // Issue a command to create a connection assertTrue(client.add("key1", 0, toBytes("foo")).get()); assertEquals("foo", toString(client.get("key1"))); // Stop and start server to close all connections if (!redisProvided) { embeddedRedisServer.stop(); embeddedRedisServer.start(); } // If we now issue commands, the old connection is defunct and will be replaced assertTrue(client.add("key1", 0, toBytes("foo")).get()); assertEquals("foo", toString(client.get("key1"))); client.shutdown(); }
@Override public void tearDown() { if (redisServer != null) { redisServer.stop(); redisServer = null; } }
@PreDestroy public void stopRedis() { redisServer.stop(); log.info("Stopped Embedded Redis Server on port {}.", redisPort); }
@Override protected void after() { if (redisServer != null) { log.info("stopping Redis-Instance ..."); redisServer.stop(); log.info("Redis-Instance stopped."); } }
@PreDestroy public void stopRedis() { redisServer.stop(); log.info("Stopped Embedded Redis Server on port {}.", redisPort); }
@PreDestroy public void destroy() { if (redisServer.isActive()) { redisServer.stop(); } } }
@PreDestroy public void destroy() { if (redisServer.isActive()) { redisServer.stop(); } } }
@PreDestroy public void destroy() { if (redisServer.isActive()) { redisServer.stop(); } } }
@Override public void close() { jedisPool.destroy(); try { redisServer.stop(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new RuntimeException(e); } }
@AfterClass static public void stopRedis() throws Exception { server.stop(); }
@AfterClass static public void stopRedis() throws Exception { server.stop(); }
@After public void tearDown(TestContext tc) { retriever.close(); testRedisClient.close(tc.asyncAssertSuccess()); vertx.close(tc.asyncAssertSuccess()); redisServer.stop(); }