Skip to content

Commit

Permalink
fixup!: resolve comments
Browse files Browse the repository at this point in the history
Signed-off-by: Phoeniix Zhao <[email protected]>
  • Loading branch information
Phoenix500526 committed May 11, 2024
1 parent 2bc9e02 commit d36db93
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
9 changes: 8 additions & 1 deletion crates/curp/src/members.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,14 @@ impl ClusterInfo {
.members
.into_iter()
.map(|mut member| {
if sorted_self_addr == member.peer_urls() {
if sorted_self_addr
== member
.peer_urls()
.iter()
.cloned()
.sorted()
.collect::<Vec<_>>()
{
member_id = member.id;
member.name = self_name.to_owned();
member.client_urls = self_client_urls.to_vec();
Expand Down
9 changes: 7 additions & 2 deletions scripts/validation_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ source $DIR/log.sh
QUICK_START="${DIR}/quick_start.sh"
ETCDCTL="docker exec -i client etcdctl --endpoints=http://172.20.0.3:2379,http://172.20.0.4:2379"
LOCK_CLIENT="docker exec -i client /mnt/validation_lock_client --endpoints=http://172.20.0.3:2379,http://172.20.0.4:2379,http://172.20.0.5:2379"
export LOG_PATH=/mnt/logs
export LOG_LEVEL=debug

LOG_PATH=/mnt/logs LOG_LEVEL=debug bash ${QUICK_START}
bash ${QUICK_START}

stop() {
docker_id=$(docker ps -qf "name=node4")
if [ -n "$docker_id" ]; then
docker stop $docker_id
fi
bash ${QUICK_START} stop
}

Expand Down Expand Up @@ -326,7 +332,6 @@ cluster_validation() {
check_positive "Member\s+${node_id} removed from cluster\s+${cluster_id}"
run "${ETCDCTL} member list"
check_negative "\s*[0-9a-z]+, started, node4, ${updated_node4_url}, ${node4_client_url}, false"
common::stop_container node4
log::info "cluster validation test passed"
}

Expand Down

0 comments on commit d36db93

Please sign in to comment.