Skip to content

Commit

Permalink
fix script ut
Browse files Browse the repository at this point in the history
  • Loading branch information
Y-Rookie committed Jan 7, 2025
1 parent 09b9919 commit a14f059
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion addons/redis/redis-cluster-scripts/redis-cluster-manage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ verify_secondary_in_all_primaries() {
primary_port=$(echo "$primary_node" | cut -d':' -f2)
retry_count=0
while ! check_node_in_cluster "$primary_host" "$primary_port" "$secondary_pod_name" && [ $retry_count -lt 30 ]; do
sleep 3
sleep_when_ut_mode_false 3
((retry_count++))
done
# shellcheck disable=SC2086
Expand Down
24 changes: 24 additions & 0 deletions addons/redis/scripts-ut-spec/redis_cluster_manage_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,10 @@ d-98x-redis-advertised-1:31318.shard-7hy@redis-shard-7hy-redis-advertised-0:3202
initialize_redis_cluster_primary_nodes["redis-shard-jwl-0"]="10.42.0.5:6379"
}

check_initialize_nodes_ready() {
return 0
}

create_redis_cluster() {
return 1
}
Expand Down Expand Up @@ -780,6 +784,10 @@ d-98x-redis-advertised-1:31318.shard-7hy@redis-shard-7hy-redis-advertised-0:3202
initialize_redis_cluster_primary_nodes["redis-shard-jwl-0"]="10.42.0.5:6379"
}

check_initialize_nodes_ready() {
return 0
}

create_redis_cluster() {
return 0
}
Expand Down Expand Up @@ -818,6 +826,10 @@ d-98x-redis-advertised-1:31318.shard-7hy@redis-shard-7hy-redis-advertised-0:3202
initialize_redis_cluster_primary_nodes["redis-shard-jwl-0"]="10.42.0.5:6379"
}

check_initialize_nodes_ready() {
return 0
}

create_redis_cluster() {
return 0
}
Expand Down Expand Up @@ -859,6 +871,10 @@ d-98x-redis-advertised-1:31318.shard-7hy@redis-shard-7hy-redis-advertised-0:3202
initialize_redis_cluster_primary_nodes["redis-shard-jwl-0"]="10.42.0.5:6379"
}

check_initialize_nodes_ready() {
return 0
}

create_redis_cluster() {
return 0
}
Expand Down Expand Up @@ -906,6 +922,10 @@ d-98x-redis-advertised-1:31318.shard-7hy@redis-shard-7hy-redis-advertised-0:3202
initialize_redis_cluster_primary_nodes["redis-shard-jwl-0"]="10.42.0.5:6379"
}

check_initialize_nodes_ready() {
return 0
}

create_redis_cluster() {
return 0
}
Expand Down Expand Up @@ -955,6 +975,10 @@ d-98x-redis-advertised-1:31318.shard-7hy@redis-shard-7hy-redis-advertised-0:3202
initialize_redis_cluster_primary_nodes["redis-shard-7hy-0"]="10.42.0.3:6379"
initialize_redis_cluster_primary_nodes["redis-shard-jwl-0"]="10.42.0.5:6379"
}

check_initialize_nodes_ready() {
return 0
}

create_redis_cluster() {
return 0
Expand Down

0 comments on commit a14f059

Please sign in to comment.