From d2f7ac4898489cd7a9f9b201262992dd20e5e296 Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Wed, 19 Aug 2015 11:43:19 -0500 Subject: [PATCH] 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 --- .../data/redis/RedisOperationsSessionRepositoryITests.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-session/src/integration-test/java/org/springframework/session/data/redis/RedisOperationsSessionRepositoryITests.java b/spring-session/src/integration-test/java/org/springframework/session/data/redis/RedisOperationsSessionRepositoryITests.java index 0dafff8..0e59a05 100644 --- a/spring-session/src/integration-test/java/org/springframework/session/data/redis/RedisOperationsSessionRepositoryITests.java +++ b/spring-session/src/integration-test/java/org/springframework/session/data/redis/RedisOperationsSessionRepositoryITests.java @@ -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 {