From cfc906167cbbd25f83903b088a4e70b50d6469eb Mon Sep 17 00:00:00 2001 From: Jonathan Leibiusky Date: Wed, 11 May 2011 18:34:41 -0300 Subject: [PATCH] add test to check JedisPool with password --- .../java/redis/clients/jedis/tests/JedisPoolTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/test/java/redis/clients/jedis/tests/JedisPoolTest.java b/src/test/java/redis/clients/jedis/tests/JedisPoolTest.java index a303cd2..158adbf 100644 --- a/src/test/java/redis/clients/jedis/tests/JedisPoolTest.java +++ b/src/test/java/redis/clients/jedis/tests/JedisPoolTest.java @@ -84,4 +84,15 @@ public class JedisPoolTest extends Assert { newJedis.auth("foobared"); newJedis.incr("foo"); } + + @Test + public void securePool() { + JedisPoolConfig config = new JedisPoolConfig(); + config.setTestOnBorrow(true); + JedisPool pool = new JedisPool(config, hnp.host, hnp.port, 2000, "foobared"); + Jedis jedis = pool.getResource(); + jedis.set("foo", "bar"); + pool.returnResource(jedis); + pool.destroy(); + } } \ No newline at end of file