Example usage for org.springframework.data.redis.connection.lettuce LettuceConnectionFactory getReactiveConnection

List of usage examples for org.springframework.data.redis.connection.lettuce LettuceConnectionFactory getReactiveConnection

Introduction

In this page you can find the example usage for org.springframework.data.redis.connection.lettuce LettuceConnectionFactory getReactiveConnection.

Prototype

@Override
    public LettuceReactiveRedisConnection getReactiveConnection() 

Source Link

Usage

From source file:org.springframework.data.redis.connection.lettuce.LettuceConnectionFactoryTests.java

@Test // DATAREDIS-525
public void factoryShouldReturnReactiveConnectionWhenCorrectly() {

    LettuceConnectionFactory factory = new LettuceConnectionFactory();
    factory.setClientResources(LettuceTestClientResources.getSharedClientResources());
    factory.afterPropertiesSet();//from  www  .j a va2s  .  co m

    ConnectionFactoryTracker.add(factory);

    assertThat(factory.getReactiveConnection().execute(BaseRedisReactiveCommands::ping).blockFirst(),
            is("PONG"));
}