JedisSessionRepositoryFactory extends AbstractRedisSessionRepositoryFactory { static JedisPoolConfig configurePool(RedisConfiguration config) { JedisPoolConfig poolConfig = new JedisPoolConfig(); poolConfig.setMaxTotal(Integer.parseInt(config.poolSize)); poolConfig.setMaxIdle(Math.min(poolConfig.getMaxIdle(), poolConfig.getMaxTotal())); poolConfig.setMinIdle(Math.min(poolConfig.getMinIdle(), poolConfig.getMaxIdle())); return poolConfig; }    }
@Test public void testConfigurePool() { SessionConfiguration sc = new SessionConfiguration(); RedisConfiguration configuration = new RedisConfiguration(sc); configuration.poolSize = "500"; JedisPoolConfig pool = JedisSessionRepositoryFactory.configurePool(configuration); assertEquals(500, pool.getMaxTotal()); }