PragmaTwice commented on code in PR #1489:
URL: https://github.com/apache/kvrocks/pull/1489#discussion_r1238828281
##########
tests/gocase/unit/scan/scan_test.go:
##########
@@ -52,13 +52,26 @@ func TestScanEmptyKey(t *testing.T) {
require.Equal(t, []string{"", "fab", "fiz", "foobar"}, keys)
}
-func TestScan(t *testing.T) {
+func TestScanWithNumberCursor(t *testing.T) {
srv := util.StartServer(t, map[string]string{})
defer srv.Close()
+ ctx := context.Background()
+ rdb := srv.NewClient()
+ defer func() { require.NoError(t, rdb.Close()) }()
+ ScanTest(t, rdb, ctx)
+}
+func TestScanWithStringCursor(t *testing.T) {
+ srv := util.StartServer(t, map[string]string{})
+ defer srv.Close()
ctx := context.Background()
rdb := srv.NewClient()
defer func() { require.NoError(t, rdb.Close()) }()
+ require.NoError(t, rdb.ConfigSet(ctx, "redis-cursor-compatible",
"no").Err())
+ ScanTest(t, rdb, ctx)
+}
Review Comment:
The default value of `redis-cursor-compatible` is `no`. I think the
`TestScanWithNumberCursor` does not work as expected.
--
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]