Skip to content

Commit

Permalink
fix: fix lock_rpc_validation stuck issue
Browse files Browse the repository at this point in the history
Signed-off-by: Phoeniix Zhao <[email protected]>
  • Loading branch information
Phoenix500526 committed Mar 14, 2024
1 parent ef29834 commit 30711ea
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions scripts/validation_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@ trap stop TERM

res=""

function parse_result() {
local tmp_res=""
while read -r line; do
log::debug $line
tmp_res="${tmp_res}${line}\n"
done
res="${tmp_res}"
}


function check() {
local pattern=$1
if [[ $(echo -e $res) =~ $pattern ]]; then
Expand All @@ -37,10 +27,20 @@ function check() {
fi
}

function parse_result() {
local tmp_res=""
while read -r line; do
log::info $line
tmp_res="${tmp_res}${line}\n"
done
res="${tmp_res}"
}

function run() {
command=$@
log::info "running: $command"
parse_result <<< "$(eval $command 2>&1)"
local run_res="$(eval $command 2>&1)"
parse_result <<< $run_res
}

# validate compact requests
Expand Down

0 comments on commit 30711ea

Please sign in to comment.