Skip to content

Commit

Permalink
close lettuce client in unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
areyouok committed Mar 28, 2018
1 parent c701379 commit 3b9cd1f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,6 @@ public void removeAndClose(AbstractRedisClient redisClient) {
if (lo.connection != null) {
lo.connection.close();
}
redisClient.shutdown();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,6 @@ public void removeAndClose(AbstractRedisClient redisClient) {
if (lo.connection != null) {
lo.connection.close();
}
redisClient.shutdown();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ public void testWithMultiLevelCache() throws Exception {
LoadingCacheTest.loadingCacheTest(MultiLevelCacheBuilder.createMultiLevelCacheBuilder()
.expireAfterWrite(5000, TimeUnit.MILLISECONDS)
.addCache(l1Cache, l2Cache), 50);

LettuceConnectionManager.defaultManager().removeAndClose(client);
}

private void test(AbstractRedisClient client) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ public void testWithMultiLevelCache() throws Exception {
LoadingCacheTest.loadingCacheTest(MultiLevelCacheBuilder.createMultiLevelCacheBuilder()
.expireAfterWrite(5000, TimeUnit.MILLISECONDS)
.addCache(l1Cache, l2Cache), 50);

LettuceConnectionManager.defaultManager().removeAndClose(client);
}

private void test(AbstractRedisClient client) throws Exception {
Expand Down

0 comments on commit 3b9cd1f

Please sign in to comment.