assert cleanup
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/19543452 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/19543452 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/19543452 Branch: refs/heads/trunk Commit: 1954345297dddd4fde9da5c5850f7fa81f32c481 Parents: 788f873 Author: Jonathan Ellis <[email protected]> Authored: Thu Feb 21 17:03:32 2013 -0800 Committer: Jonathan Ellis <[email protected]> Committed: Sat Feb 23 10:27:59 2013 -0600 ---------------------------------------------------------------------- .../unit/org/apache/cassandra/db/KeyCacheTest.java | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/19543452/test/unit/org/apache/cassandra/db/KeyCacheTest.java ---------------------------------------------------------------------- diff --git a/test/unit/org/apache/cassandra/db/KeyCacheTest.java b/test/unit/org/apache/cassandra/db/KeyCacheTest.java index cc442f2..5af8aca 100644 --- a/test/unit/org/apache/cassandra/db/KeyCacheTest.java +++ b/test/unit/org/apache/cassandra/db/KeyCacheTest.java @@ -96,8 +96,7 @@ public class KeyCacheTest extends SchemaLoader CacheService.instance.invalidateKeyCache(); // KeyCache should start at size 0 if we're caching X% of zero data. - int keyCacheSize = CacheService.instance.keyCache.size(); - assert keyCacheSize == 0 : keyCacheSize; + assertEquals(0, CacheService.instance.keyCache.size()); DecoratedKey key1 = Util.dk("key1"); DecoratedKey key2 = Util.dk("key2"); @@ -132,10 +131,9 @@ public class KeyCacheTest extends SchemaLoader assert CacheService.instance.keyCache.size() == 2; Util.compactAll(cfs).get(); - keyCacheSize = CacheService.instance.keyCache.size(); // after compaction cache should have entries for // new SSTables, if we had 2 keys in cache previously it should become 4 - assert keyCacheSize == 4 : keyCacheSize; + assertEquals(4, CacheService.instance.keyCache.size()); // re-read same keys to verify that key cache didn't grow further cfs.getColumnFamily(QueryFilter.getSliceFilter(key1,
