Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
try to fix an unstable test
Browse files Browse the repository at this point in the history
  • Loading branch information
glorv committed Jun 1, 2021
1 parent a97d7a1 commit ac53943
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/_utils/check_metric
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ shift 3
counter=0
while [ $counter -lt $retry_count ]; do
metric=$(curl -s http://127.0.0.1:$port/metrics | grep $metric_name | grep -v "#" | awk '{printf("%d",$2)}')
if [ $lower -lt $metric ] && [ $metric -lt $upper ]; then
if [ -n $metric ] && [ $lower -lt $metric ] && [ $metric -lt $upper ]; then
exit 0
fi
((counter += 1))
Expand Down
4 changes: 3 additions & 1 deletion tests/start_task/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,14 @@ function run() {
"ERROR" 1

echo "reset go failpoints, and need restart dm-worker, then start task again"
kill_dm_worker
kill_dm_master

export GO_FAILPOINTS=''

run_dm_master $WORK_DIR/master $MASTER_PORT $cur/conf/dm-master.toml
check_rpc_alive $cur/../bin/check_master_online 127.0.0.1:$MASTER_PORT
run_dm_worker $WORK_DIR/worker1 $WORKER1_PORT $cur/conf/dm-worker1.toml
check_rpc_alive $cur/../bin/check_worker_online 127.0.0.1:$WORKER1_PORT
sleep 5

dmctl_start_task_standalone $task_conf
Expand Down

0 comments on commit ac53943

Please sign in to comment.