jihuayu commented on code in PR #1489:
URL: 
https://github.com/apache/incubator-kvrocks/pull/1489#discussion_r1234132063


##########
tests/gocase/unit/scan/scan_test.go:
##########
@@ -52,13 +52,27 @@ 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()) }()
+       require.NoError(t, rdb.ConfigSet(ctx, "redis-cursor-compatible", 
"yes").Err())

Review Comment:
   I don't think the failure of `--bigkeys`  is something that needs to be 
tested. We don't care about whether  `--bigkeys` 
    runs successfully or not when `redis-cursor-compatible` is set to `no`. 
Success is best, but failure is okay too.
   
   
   
   The function 
[`TestScanWithStringCursor`](https://github.com/apache/incubator-kvrocks/pull/1489/files/a36c1412fb25dc283589bcc2c1169f90b9724b35#diff-07aeba1404d8a74294e03c47a257b71cf973c8e8aad8950f2f630e14b5cf1455R65-R73)
 shows when `redis-cursor-compatible` set to `no` ScanTest works well
   
   I think I can remove `require.NoError(t, rdb.ConfigSet(ctx, 
"redis-cursor-compatible", "yes").Err())`.



-- 
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]

Reply via email to