Fix failing cluster tests. (#8763)

Disable replica migration to avoid a race condition where the
migrated-from node turns into a replica.

Long term, this test should probably be improved to handle multiple
slots and accept such auto migrations but this is a quick fix to
stabilize the CI without completely dropping this test.
This commit is contained in:
Yossi Gottlieb 2021-04-13 00:00:57 +03:00 committed by GitHub
parent a0e19e3cf1
commit 5e3a15ae1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 1 deletions

View File

@ -9,6 +9,7 @@ source "../tests/includes/utils.tcl"
test "Create a 2 nodes cluster" {
create_cluster 2 0
config_set_all_nodes cluster-allow-replica-migration no
}
test "Cluster is up" {
@ -87,3 +88,5 @@ test "Half-finish importing" {
fix_cluster $nodefrom(addr)
assert_equal "xyz" [$cluster get aga]
}
config_set_all_nodes cluster-allow-replica-migration yes

View File

@ -9,6 +9,7 @@ source "../tests/includes/utils.tcl"
test "Create a 10 nodes cluster" {
create_cluster 10 0
config_set_all_nodes cluster-allow-replica-migration no
}
test "Cluster is up" {
@ -54,3 +55,4 @@ test "Keys are accessible" {
}
}
config_set_all_nodes cluster-allow-replica-migration yes

View File

@ -1,5 +1,11 @@
source "../../../tests/support/cli.tcl"
proc config_set_all_nodes {keyword value} {
foreach_redis_id id {
R $id config set $keyword $value
}
}
proc fix_cluster {addr} {
set code [catch {
exec ../../../src/redis-cli {*}[rediscli_tls_config "../../../tests"] --cluster fix $addr << yes