Skip to content

Commit

Permalink
Test: Fix grpc example (databendlabs#1328)
Browse files Browse the repository at this point in the history
  • Loading branch information
byronwasti authored Feb 11, 2025
1 parent 73fbae1 commit f5790c5
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions examples/raft-kv-memstore-grpc/test-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ rpc() {
local port=$1
local method=$2
local body="$3"
local isApiService="$4"
local cmd="grpcurl -plaintext -proto ./proto/management_service.proto -d $body -import-path ./proto localhost:$port openraftpb.ManagementService/$method"
if [ "$isApiService" = "true" ]; then
cmd="grpcurl -plaintext -proto ./proto/api_service.proto -d $body -import-path ./proto localhost:$port openraftpb.ApiService/$method"
fi
local cmd="grpcurl -plaintext -proto ./proto/app.proto -d $body -import-path ./proto localhost:$port openraftpb.AppService/$method"

echo '---'" rpc(127.0.0.1:$port/$method, $body)"

Expand Down Expand Up @@ -128,7 +124,7 @@ sleep 1
echo "Write foo=zoo on node-1"
sleep 1
echo
rpc 5051 Set '{"key":"foo","value":"zoo"}' true
rpc 5051 Set '{"key":"foo","value":"zoo"}'
sleep 1
echo "Data written"
sleep 1
Expand All @@ -137,7 +133,7 @@ echo "Read foo=zoo from node-2"
sleep 1
echo "Read from node 2"
echo
rpc 5052 Get '{"key":"foo"}' true
rpc 5052 Get '{"key":"foo"}'
echo


Expand Down

0 comments on commit f5790c5

Please sign in to comment.