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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user