List of usage examples for org.springframework.data.redis.connection StringRedisConnection ping
@Nullable String ping();
From source file:org.springframework.data.redis.connection.lettuce.LettuceConnectionFactoryTests.java
@Test // DATAREDIS-462 public void factoryWorksWithoutClientResources() { LettuceConnectionFactory factory = new LettuceConnectionFactory(); factory.setShutdownTimeout(0);// w w w . ja v a 2s. c om factory.afterPropertiesSet(); ConnectionFactoryTracker.add(factory); StringRedisConnection connection = new DefaultStringRedisConnection(factory.getConnection()); try { assertThat(connection.ping(), is(equalTo("PONG"))); } finally { connection.close(); } }