Add wrapper for GenericObjectPool.Config for Spring

This commit is contained in:
Jennifer Hickey
2013-06-24 13:50:52 -07:00
parent b79f7b8df0
commit cc9b0821a0
2 changed files with 81 additions and 2 deletions

View File

@@ -24,6 +24,7 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.data.redis.SettingsUtils;
import org.springframework.data.redis.connection.PoolConfig;
import org.springframework.data.redis.connection.PoolException;
import com.lambdaworks.redis.RedisAsyncConnection;
@@ -79,8 +80,8 @@ public class LettucePoolTests {
@Test
public void testGetResourceValidate() {
Config poolConfig = new Config();
poolConfig.testOnBorrow = true;
PoolConfig poolConfig = new PoolConfig();
poolConfig.setTestOnBorrow(true);
this.pool = new LettucePool(client, poolConfig, 0);
RedisAsyncConnection<byte[], byte[]> client = pool.getResource();
assertNotNull(client);