Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix pulsar addon typo #1115

Merged
merged 5 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions addons/pulsar/scripts-ut-spec/init_broker_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ Describe "Pulsar Init Broker Bash Script Tests"
return 0
}

quit_script() {
return 0
}

When run init_broker
The status should be success
End
Expand All @@ -158,10 +154,6 @@ Describe "Pulsar Init Broker Bash Script Tests"
return 0
}

quit_script() {
return 0
}

python3() {
return 0
}
Expand Down Expand Up @@ -198,10 +190,6 @@ Describe "Pulsar Init Broker Bash Script Tests"
return 0
}

quit_script() {
return 0
}

When run init_broker
The stdout should include "Initializing cluster metadata for cluster: my-cluster"
The status should be success
Expand Down
4 changes: 2 additions & 2 deletions addons/pulsar/scripts/init-broker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ init_broker() {
local idx=${POD_NAME##*-}
if [ $idx -ne 0 ]; then
wait_for_cluster_metadata "$zookeeperServers" "$clusterName"
echo "Cluster already initialized" && quit_script
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to && exit 0 to keep the semantic.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to && exit 0 to keep the semantic.

fixed done

echo "Waiting for cluster initialize ready."
fi

if check_cluster_initialized "$zookeeperServers" "$clusterName"; then
echo "Cluster already initialized" && quit_script
echo "Cluster already initialized"
fi

initialize_cluster_metadata "$clusterName" "$zookeeperServers" "$webServiceUrl" "$brokerServiceUrl"
Expand Down
Loading