use of org.springframework.session.data.mongo.ReactiveMongoSessionRepository in project spring-boot by spring-projects.
the class ReactiveSessionAutoConfigurationMongoTests method defaultConfigWithCustomTimeout.
@Test
void defaultConfigWithCustomTimeout() {
this.contextRunner.withPropertyValues("spring.session.store-type=mongodb", "spring.session.timeout=1m", "spring.data.mongodb.uri=" + mongoDb.getReplicaSetUrl()).withConfiguration(AutoConfigurations.of(MongoAutoConfiguration.class, MongoDataAutoConfiguration.class, MongoReactiveAutoConfiguration.class, MongoReactiveDataAutoConfiguration.class)).run((context) -> {
ReactiveMongoSessionRepository repository = validateSessionRepository(context, ReactiveMongoSessionRepository.class);
assertThat(repository).hasFieldOrPropertyWithValue("maxInactiveIntervalInSeconds", 60);
});
}
use of org.springframework.session.data.mongo.ReactiveMongoSessionRepository in project spring-boot by spring-projects.
the class ReactiveSessionAutoConfigurationMongoTests method defaultConfigWithCustomSessionTimeout.
@Test
void defaultConfigWithCustomSessionTimeout() {
this.contextRunner.withPropertyValues("spring.session.store-type=mongodb", "server.reactive.session.timeout=1m", "spring.data.mongodb.uri=" + mongoDb.getReplicaSetUrl()).withConfiguration(AutoConfigurations.of(MongoAutoConfiguration.class, MongoDataAutoConfiguration.class, MongoReactiveAutoConfiguration.class, MongoReactiveDataAutoConfiguration.class)).run((context) -> {
ReactiveMongoSessionRepository repository = validateSessionRepository(context, ReactiveMongoSessionRepository.class);
assertThat(repository).hasFieldOrPropertyWithValue("maxInactiveIntervalInSeconds", 60);
});
}
Aggregations