Merge pull request #8713 from tapankavasthi/tavasthi-redis-integrationtest-fix

Resolve Redis Client Connection Issue in Integration Test
This commit is contained in:
Dhawal Kapil 2020-02-13 00:58:15 +05:30 committed by GitHub
commit 7f271902a3
3 changed files with 11 additions and 4 deletions

View File

@ -146,4 +146,9 @@ public class RedisClient {
}
}
public void destroyInstance() {
jedisPool = null;
instance = null;
}
}

View File

@ -25,13 +25,14 @@ public class NaiveApproachIntegrationTest {
s.close();
redisServer = new RedisServer(port);
redisServer.start();
}
@AfterClass
public static void destroy() {
if (redisServer.isActive())
if (redisServer.isActive()) {
redisServer.stop();
redisClient.destroyInstance();
}
}
@Before

View File

@ -32,13 +32,14 @@ public class ScanStrategyIntegrationTest {
s.close();
redisServer = new RedisServer(port);
redisServer.start();
}
@AfterClass
public static void destroy() {
if (redisServer.isActive())
if (redisServer.isActive()) {
redisServer.stop();
redisClient.destroyInstance();
}
}
@Before