From 1076140bf54d365cff87e5e961ee1be38cd0ca81 Mon Sep 17 00:00:00 2001 From: Jonathan Leibiusky Date: Thu, 20 Jan 2011 16:05:40 -0300 Subject: [PATCH] test use the new jedis pool config --- .../redis/clients/jedis/tests/JedisPoolTest.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/test/java/redis/clients/jedis/tests/JedisPoolTest.java b/src/test/java/redis/clients/jedis/tests/JedisPoolTest.java index f4ae3d7..6b4ddde 100644 --- a/src/test/java/redis/clients/jedis/tests/JedisPoolTest.java +++ b/src/test/java/redis/clients/jedis/tests/JedisPoolTest.java @@ -8,6 +8,7 @@ import org.junit.Test; import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisException; import redis.clients.jedis.JedisPool; +import redis.clients.jedis.JedisPoolConfig; import redis.clients.jedis.tests.HostAndPortUtil.HostAndPort; public class JedisPoolTest extends Assert { @@ -15,7 +16,8 @@ public class JedisPoolTest extends Assert { @Test public void checkConnections() throws Exception { - JedisPool pool = new JedisPool(new Config(), hnp.host, hnp.port, 2000); + JedisPool pool = new JedisPool(new JedisPoolConfig(), hnp.host, + hnp.port, 2000); Jedis jedis = pool.getResource(); jedis.auth("foobared"); jedis.set("foo", "bar"); @@ -26,7 +28,8 @@ public class JedisPoolTest extends Assert { @Test public void checkConnectionWithDefaultPort() throws Exception { - JedisPool pool = new JedisPool(new Config(), hnp.host, hnp.port); + JedisPool pool = new JedisPool(new JedisPoolConfig(), hnp.host, + hnp.port); Jedis jedis = pool.getResource(); jedis.auth("foobared"); jedis.set("foo", "bar"); @@ -37,7 +40,8 @@ public class JedisPoolTest extends Assert { @Test public void checkJedisIsReusedWhenReturned() throws Exception { - JedisPool pool = new JedisPool(new Config(), hnp.host, hnp.port); + JedisPool pool = new JedisPool(new JedisPoolConfig(), hnp.host, + hnp.port); Jedis jedis = pool.getResource(); jedis.auth("foobared"); jedis.set("foo", "0"); @@ -52,7 +56,8 @@ public class JedisPoolTest extends Assert { @Test public void checkPoolRepairedWhenJedisIsBroken() throws Exception { - JedisPool pool = new JedisPool(new Config(), hnp.host, hnp.port); + JedisPool pool = new JedisPool(new JedisPoolConfig(), hnp.host, + hnp.port); Jedis jedis = pool.getResource(); jedis.auth("foobared"); jedis.quit();