List of usage examples for org.springframework.data.redis.connection.jedis JedisConnectionFactory setPort
@Deprecated public void setPort(int port)
From source file:org.springframework.integration.redis.rules.RedisAvailableRule.java
public Statement apply(final Statement base, final FrameworkMethod method, Object target) { return new Statement() { @Override/*from w w w. j a v a 2s .c o m*/ public void evaluate() throws Throwable { RedisAvailable redisAvailable = method.getAnnotation(RedisAvailable.class); if (redisAvailable != null) { try { JedisConnectionFactory connectionFactory = new JedisConnectionFactory(); connectionFactory.setPort(REDIS_PORT); connectionFactory.afterPropertiesSet(); connectionFactory.getConnection(); } catch (Exception e) { if (logger.isWarnEnabled()) { logger.warn(String.format( "Redis is not available on " + "port '%s'. Skipping the test.", REDIS_PORT)); } return; } } base.evaluate(); } }; }