Change key value if prefix changes

Some weird looking test failures led me to track this down.
If the user changes the prefix for metric names, he probably wanted
to change the keys as welll (otherwise 2 repositories can use the
same key, which is why the test was failing for me). We can do that
in an afterPropertiesSet().
This commit is contained in:
Dave Syer
2014-10-02 16:36:07 +01:00
parent a702ff5c36
commit d724c9062b
2 changed files with 19 additions and 4 deletions

View File

@@ -44,6 +44,7 @@ public class RedisMetricRepositoryTests {
this.repository = new RedisMetricRepository(this.redis.getResource());
this.prefix = "spring.test." + System.currentTimeMillis();
this.repository.setPrefix(this.prefix);
this.repository.afterPropertiesSet();
}
@After