You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "tisonkun (via GitHub)" <gi...@apache.org> on 2023/05/23 02:52:41 UTC

[GitHub] [incubator-kvrocks] tisonkun commented on a diff in pull request #1464: Fix flaky test in migration timeout

tisonkun commented on code in PR #1464:
URL: https://github.com/apache/incubator-kvrocks/pull/1464#discussion_r1201439974


##########
tests/gocase/integration/slotmigrate/slotmigrate_test.go:
##########
@@ -412,23 +412,19 @@ func TestSlotMigrateSync(t *testing.T) {
 	})
 
 	t.Run("MIGRATE - Migrate sync with (or without) all kinds of timeouts", func(t *testing.T) {
-		slot++
-		require.Equal(t, "OK", rdb0.Do(ctx, "clusterx", "migrate", slot, id1, "sync").Val())
-
-		slot++
-		require.Equal(t, "OK", rdb0.Do(ctx, "clusterx", "migrate", slot, id1, "sync", -1).Val())
-
-		slot++
-		require.Equal(t, "OK", rdb0.Do(ctx, "clusterx", "migrate", slot, id1, "sync", 0).Val())
-
-		slot++
-		require.Equal(t, "OK", rdb0.Do(ctx, "clusterx", "migrate", slot, id1, "sync", 10).Val())
-
-		slot++
-		require.Equal(t, "OK", rdb0.Do(ctx, "clusterx", "migrate", slot, id1, "sync", 0.5).Val())
-
-		slot++
-		require.Equal(t, "OK", rdb0.Do(ctx, "clusterx", "migrate", slot, id1, "sync", -3.14).Val())
+		slot := 1024

Review Comment:
   Can we add a comment for this magic number? From the description it's to avoid slot num conflict.



-- 
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: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org