This is an automated email from the ASF dual-hosted git repository.

git-hulk pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git


The following commit(s) were added to refs/heads/unstable by this push:
     new d3c996308 fix(tests): populate the migrated slot in cluster reset test 
(#3707)
d3c996308 is described below

commit d3c996308e457bbc54f3f8fb86966b5c28e27b28
Author: hulk <[email protected]>
AuthorDate: Thu Oct 22 10:06:29 2026 +0800

    fix(tests): populate the migrated slot in cluster reset test (#3707)
    
    The cluster-reset migration test fills my-list in slot 3491 but migrates
    slot 2, so its rate limit does not delay the empty migration.
    
    Migration can finish before the status check or reset command, causing
    the test to miss the active-migration state.
    
    Populate a key in the target slot so the configured rate limit provides
    the intended observation window.
    
    References:
    
    - [Failing CI job
    
1](https://github.com/apache/kvrocks/actions/runs/39583771665/job/119170399648?pr=3705)
    - [Failing CI job
    
2](https://github.com/apache/kvrocks/actions/runs/39437591997/job/118681283733)
    
    Fixes #3687
    
    Assistant-By GPT-6
---
 tests/gocase/integration/cluster/cluster_test.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/gocase/integration/cluster/cluster_test.go 
b/tests/gocase/integration/cluster/cluster_test.go
index 8bbf02410..234afe1d6 100644
--- a/tests/gocase/integration/cluster/cluster_test.go
+++ b/tests/gocase/integration/cluster/cluster_test.go
@@ -574,13 +574,14 @@ func TestClusterReset(t *testing.T) {
 
        t.Run("cannot reset cluster if the db is migrating the slot", func(t 
*testing.T) {
                slotNum := 2
+               key := util.SlotTable[slotNum]
                // slow down the migration speed to ensure we can observe the 
"start" state
                // before migration completes (especially on fast hardware like 
macOS ARM)
                require.NoError(t, rdb0.ConfigSet(ctx, "migrate-batch-size-kb", 
"1").Err())
                require.NoError(t, rdb0.ConfigSet(ctx, 
"migrate-batch-rate-limit-mb", "1").Err())
                value := strings.Repeat("a", 512)
                for i := 0; i < 4096; i++ {
-                       require.NoError(t, rdb0.RPush(ctx, "my-list", 
value).Err())
+                       require.NoError(t, rdb0.RPush(ctx, key, value).Err())
                }
 
                require.Equal(t, "OK", rdb0.Do(ctx, "clusterx", "migrate", 
slotNum, id1).Val())

Reply via email to