Change constructor signature for RedisMetricRepository

Otherwise we had to rely on afterPropertiesSet() being called to
validate and compute the prefix and key (which depend on each
other).
This commit is contained in:
Dave Syer
2014-10-02 17:05:46 +01:00
parent c18b4248e5
commit d63bbdfe44
2 changed files with 49 additions and 37 deletions

View File

@@ -41,10 +41,8 @@ public class RedisMetricRepositoryTests {
@Before
public void init() {
this.repository = new RedisMetricRepository(this.redis.getResource());
this.prefix = "spring.test." + System.currentTimeMillis();
this.repository.setPrefix(this.prefix);
this.repository.afterPropertiesSet();
this.repository = new RedisMetricRepository(this.redis.getResource(), this.prefix);
}
@After