Search in sources :

Example 1 with HazelcastSessionRepository

use of org.springframework.session.hazelcast.HazelcastSessionRepository in project spring-boot by spring-projects.

the class SessionAutoConfigurationHazelcastTests method customFlushMode.

@Test
public void customFlushMode() {
    load(Collections.<Class<?>>singletonList(HazelcastConfiguration.class), "spring.session.store-type=hazelcast", "spring.session.hazelcast.flush-mode=immediate");
    HazelcastSessionRepository repository = validateSessionRepository(HazelcastSessionRepository.class);
    assertThat(new DirectFieldAccessor(repository).getPropertyValue("hazelcastFlushMode")).isEqualTo(HazelcastFlushMode.IMMEDIATE);
}
Also used : HazelcastSessionRepository(org.springframework.session.hazelcast.HazelcastSessionRepository) DirectFieldAccessor(org.springframework.beans.DirectFieldAccessor) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 DirectFieldAccessor (org.springframework.beans.DirectFieldAccessor)1 HazelcastSessionRepository (org.springframework.session.hazelcast.HazelcastSessionRepository)1