List of usage examples for org.springframework.data.redis SettingsUtils socketConfiguration
public static RedisSocketConfiguration socketConfiguration()
From source file:org.springframework.data.redis.connection.lettuce.LettuceConnectionFactoryTests.java
@Test // DATAREDIS-687 public void connectsThroughRedisSocket() { assumeTrue(EpollProvider.isAvailable() || KqueueProvider.isAvailable()); assumeTrue(new File(SettingsUtils.getSocket()).exists()); LettuceClientConfiguration configuration = LettuceTestClientConfiguration.create(); LettuceConnectionFactory factory = new LettuceConnectionFactory(SettingsUtils.socketConfiguration(), configuration);/*from www .j a va2 s . c o m*/ factory.setShareNativeConnection(false); factory.afterPropertiesSet(); RedisConnection connection = factory.getConnection(); assertThat(connection.ping(), is(equalTo("PONG"))); connection.close(); factory.destroy(); }