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

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

Introduction

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

Prototype

public long getTimeout() 

Source Link

Document

Returns the connection timeout (in milliseconds).

Usage

From source file:org.springframework.boot.autoconfigure.data.redis.RedisAutoConfigurationTests.java

@Test
public void testRedisConfigurationWithTimeout() {
    this.contextRunner.withPropertyValues("spring.redis.host:foo", "spring.redis.timeout:100")
            .run((context) -> {//w w w. j  a va2s .co m
                LettuceConnectionFactory cf = context.getBean(LettuceConnectionFactory.class);
                assertThat(cf.getHostName()).isEqualTo("foo");
                assertThat(cf.getTimeout()).isEqualTo(100);
            });
}