Search in sources :

Example 1 with ReactiveRedisSessionRepository

use of org.springframework.session.data.redis.ReactiveRedisSessionRepository in project spring-boot by spring-projects.

the class ReactiveSessionAutoConfigurationRedisTests method defaultConfigWithCustomWebFluxTimeout.

@Test
void defaultConfigWithCustomWebFluxTimeout() {
    this.contextRunner.withPropertyValues("spring.session.store-type=redis", "server.reactive.session.timeout=1m").withConfiguration(AutoConfigurations.of(RedisAutoConfiguration.class, RedisReactiveAutoConfiguration.class)).run((context) -> {
        ReactiveRedisSessionRepository repository = validateSessionRepository(context, ReactiveRedisSessionRepository.class);
        assertThat(repository).hasFieldOrPropertyWithValue("defaultMaxInactiveInterval", 60);
    });
}
Also used : ReactiveRedisSessionRepository(org.springframework.session.data.redis.ReactiveRedisSessionRepository) Test(org.junit.jupiter.api.Test)

Example 2 with ReactiveRedisSessionRepository

use of org.springframework.session.data.redis.ReactiveRedisSessionRepository in project spring-boot by spring-projects.

the class ReactiveSessionAutoConfigurationRedisTests method defaultConfigWithCustomTimeout.

@Test
void defaultConfigWithCustomTimeout() {
    this.contextRunner.withPropertyValues("spring.session.store-type=redis", "spring.session.timeout=1m").withConfiguration(AutoConfigurations.of(RedisAutoConfiguration.class, RedisReactiveAutoConfiguration.class)).run((context) -> {
        ReactiveRedisSessionRepository repository = validateSessionRepository(context, ReactiveRedisSessionRepository.class);
        assertThat(repository).hasFieldOrPropertyWithValue("defaultMaxInactiveInterval", 60);
    });
}
Also used : ReactiveRedisSessionRepository(org.springframework.session.data.redis.ReactiveRedisSessionRepository) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)2 ReactiveRedisSessionRepository (org.springframework.session.data.redis.ReactiveRedisSessionRepository)2