Index: filter/dscache/dscache_test.go |
diff --git a/filter/dscache/dscache_test.go b/filter/dscache/dscache_test.go |
index 6b0240d04f4f2f90c5785e9b586c83d9d85f9fba..5cdad302e3d131f00ff9bfdb408550abc727bac8 100644 |
--- a/filter/dscache/dscache_test.go |
+++ b/filter/dscache/dscache_test.go |
@@ -66,15 +66,16 @@ func TestDSCache(t *testing.T) { |
dsUnder := datastore.Get(c) |
mc := memcache.Get(c) |
- itmFor := func(i int, k datastore.Key) memcache.Item { |
+ itmFor := func(i int, k *datastore.Key) memcache.Item { |
return mc.NewItem(MakeMemcacheKey(i, k)) |
} |
- shardsForKey := func(k datastore.Key) int { |
- if k.Kind() == "shardObj" { |
- return int(k.IntID()) |
+ shardsForKey := func(k *datastore.Key) int { |
+ last := k.Last() |
iannucci
2015/09/18 04:31:52
Key changed a bit. Now instead of k.Kind(), you ge
|
+ if last.Kind == "shardObj" { |
+ return int(last.IntID) |
} |
- if k.Kind() == "noCacheObj" { |
+ if last.Kind == "noCacheObj" { |
return 0 |
} |
return DefaultShards |