Hi Xiao.

The reason I check both longKey and testKeys, is I wanted to test both the
get and mget APIs and confirm they both return the correct value back. (It
doesn't matter if the values are same)

Thanks,
Suguna


On Fri, Apr 4, 2014 at 1:51 PM, Xiao Ma <notifications@github.com> wrote:

> In test/test_RedisConnection.js:
>
> > +  Q.all(populateSetterFuncs()).then(function() {
> > +     //Retrieve all items from redis directly to inspect format
> > +     var deferred = Q.defer()
> > +     redisClient.mget(testKeys, function(err, value) {
> > +        return deferred.resolve(value)
> > +     })
> > +     return deferred.promise
> > +
> > +  }).then(function(vals) {
> > +     // confirm cache entries look good
> > +     test.deepEqual(testValues, vals)
> > +     return Q.resolve()
> > +  }).then(function() { return cacheInstanceGet.get(longKey)
> > +  }).then(function(val) {
> > +     test.equal(longVal, val)
> > +     return cacheInstanceGet.mget(testKeys)
>
> why have separate check on longKey? It seems like the check on testKeysalready covers it.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/Medium/zcache/pull/58/files#r11313165>
> .
>