PragmaTwice commented on code in PR #2983:
URL: https://github.com/apache/kvrocks/pull/2983#discussion_r2096777536
##########
tests/gocase/unit/type/zset/zset_test.go:
##########
@@ -1309,6 +1309,9 @@ func basicTests(t *testing.T, rdb *redis.Client, ctx
context.Context, enabledRES
res := rdb.ZMScore(ctx, "zset", "a", "b").Val()
require.Equal(t, int64(1), int64(res[0]))
require.Equal(t, int64(2), int64(res[1]))
+
+ require.Equal(t, redis.Nil, int64(rdb.ZMScore(ctx,
"non-existent-zset", "a", "b").Val()[0]))
+ require.Equal(t, redis.Nil, int64(rdb.ZMScore(ctx,
"non-existent-zset", "a", "b").Val()[1]))
Review Comment:
1. do not cast it to `int64`, `int64` != `nil`;
2. `rdb.ZMScore(...)` can be reused.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]