Polish RedisOperationsSessionRepositoryITests

* Add namespace so we don't receive events for other tests
* Delete Sessions so don't receive events later
* Clear Registry before every test
This commit is contained in:
Rob Winch
2015-08-19 11:43:19 -05:00
parent 5fd2c71559
commit d2f7ac4898

View File

@@ -114,6 +114,8 @@ public class RedisOperationsSessionRepositoryITests {
assertThat(session.getAttributeNames().size()).isEqualTo(2);
assertThat(session.getAttribute("a")).isEqualTo("b");
assertThat(session.getAttribute("1")).isEqualTo("2");
repository.delete(toSave.getId());
}
@Test
@@ -174,7 +176,7 @@ public class RedisOperationsSessionRepositoryITests {
}
@Configuration
@EnableRedisHttpSession
@EnableRedisHttpSession(redisNamespace = "RedisOperationsSessionRepositoryITests")
static class Config {
@Bean
public JedisConnectionFactory connectionFactory() throws Exception {