Merge pull request #8713 from tapankavasthi/tavasthi-redis-integrationtest-fix
Resolve Redis Client Connection Issue in Integration Test
This commit is contained in:
commit
7f271902a3
|
@ -146,4 +146,9 @@ public class RedisClient {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void destroyInstance() {
|
||||||
|
jedisPool = null;
|
||||||
|
instance = null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,13 +25,14 @@ public class NaiveApproachIntegrationTest {
|
||||||
s.close();
|
s.close();
|
||||||
|
|
||||||
redisServer = new RedisServer(port);
|
redisServer = new RedisServer(port);
|
||||||
redisServer.start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void destroy() {
|
public static void destroy() {
|
||||||
if (redisServer.isActive())
|
if (redisServer.isActive()) {
|
||||||
redisServer.stop();
|
redisServer.stop();
|
||||||
|
redisClient.destroyInstance();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
|
|
|
@ -32,13 +32,14 @@ public class ScanStrategyIntegrationTest {
|
||||||
s.close();
|
s.close();
|
||||||
|
|
||||||
redisServer = new RedisServer(port);
|
redisServer = new RedisServer(port);
|
||||||
redisServer.start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void destroy() {
|
public static void destroy() {
|
||||||
if (redisServer.isActive())
|
if (redisServer.isActive()) {
|
||||||
redisServer.stop();
|
redisServer.stop();
|
||||||
|
redisClient.destroyInstance();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
|
|
Loading…
Reference in New Issue