torwig commented on code in PR #2829:
URL: https://github.com/apache/kvrocks/pull/2829#discussion_r1995262511
##########
tests/gocase/integration/slotmigrate/slotmigrate_test.go:
##########
@@ -1334,6 +1334,21 @@ func TestSlotRangeMigrate(t *testing.T) {
require.ErrorContains(t, rdb0.Do(ctx, "clusterx", "migrate",
"110-112", id1).Err(), errMsg)
})
+ t.Run("MIGRATE - Migrate back a proper subset range", func(t
*testing.T) {
+ migrateSlotRangeAndSetSlot(t, ctx, rdb0, rdb1, id1, "3100-3400")
+ time.Sleep(1 * time.Second)
+ migrateSlotRangeAndSetSlot(t, ctx, rdb1, rdb0, id0, "3200-3300")
+ time.Sleep(1 * time.Second)
+
+ key := "AAA" // CLUSTER KEYSLOT AAA is `3205`, which is in the
range of `3200-3500`
+ if rdb0.ClusterKeySlot(ctx, key).Val() != 3205 {
Review Comment:
You can use `require.EqualValues` here instead of this `if` check.
--
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]