You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kvrocks.apache.org by hu...@apache.org on 2022/06/25 07:42:56 UTC

[incubator-kvrocks] branch unstable updated: Wait for migrating status finished to prevent test case failure (#666)

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

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


The following commit(s) were added to refs/heads/unstable by this push:
     new 2a86ad1  Wait for migrating status finished to prevent test case failure (#666)
2a86ad1 is described below

commit 2a86ad1642d6c352a1ddf491877937fe3154f68c
Author: hulk <hu...@gmail.com>
AuthorDate: Sat Jun 25 15:42:51 2022 +0800

    Wait for migrating status finished to prevent test case failure (#666)
---
 tests/tcl/tests/integration/slotmigrate.tcl | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/tests/tcl/tests/integration/slotmigrate.tcl b/tests/tcl/tests/integration/slotmigrate.tcl
index aacc578..aa94944 100644
--- a/tests/tcl/tests/integration/slotmigrate.tcl
+++ b/tests/tcl/tests/integration/slotmigrate.tcl
@@ -414,9 +414,9 @@ start_server {tags {"Src migration server"} overrides {cluster-enabled yes}} {
             $r0 del $slot15_key_10
 
             # Set slow migrate
-            $r0 config set migrate-speed 32
+            $r0 config set migrate-speed 64
             catch {$r0 config get migrate-speed} e
-            assert_match {*32*} $e
+            assert_match {*64*} $e
 
             set count 2000
             for {set i 0} {$i < $count} {incr i} {
@@ -509,15 +509,15 @@ start_server {tags {"Src migration server"} overrides {cluster-enabled yes}} {
             set sivalue [$r0 sirange $slot15_key_10 0 -1]
 
             # Wait for finishing
-            wait_for_condition 50 1000 {
-                [string match "*migrating_slot: 15*migrating_state: success*" [$r0 cluster info]]
-            } else {
-                fail "Slot 15 migrating is not finished"
+            while 1 {
+                if {[string match "*migrating_slot: 15*migrating_state: success*" [$r0 cluster info]]} {
+                    break
+                }
             }
-            wait_for_condition 50 1000 {
-                [string match "*15*success*" [$r1 cluster info]]
-            } else {
-                fail "Slot 15 importing is not finished"
+            while 1 {
+                if {[string match "*15*success*" [$r1 cluster info]]} {
+                    break
+                }
             }
 
             # Check if the data is consistent