Merge pull request #6964 from taosdata/test/TD-4812

[TD-4812] complete robust cluster test script
This commit is contained in:
Hui Li 2021-07-23 10:39:49 +08:00 committed by GitHub
commit a86bb47a1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

12
tests/robust/cluster.sh Normal file → Executable file
View File

@ -23,7 +23,9 @@ menu(){
echo "=============================="
echo "3 arbitrator"
echo "=============================="
echo "4 exit"
echo "4 alter replica"
echo "=============================="
echo "5 exit"
echo "=============================="
}
@ -310,6 +312,7 @@ do
2)
var=`ps -ef | grep tarbitrator | awk '{print $2}' | head -n 1`
kill -9 $var
echo -e "\033[32mSuccessfully stop arbitrator $3 \033[0m"
break
;;
3)
@ -318,6 +321,13 @@ do
esac
;;
4)
read -p "Enter replica number: " rep
read -p "Enter database name: " db
taos -s "alter database $db replica $rep"
echo -e "\033[32mSuccessfully change $db's replica to $rep \033[0m"
break
;;
5)
break
;;
esac

8
tests/robust/monitor.sh Executable file
View File

@ -0,0 +1,8 @@
while :
do
dlog=`taos -s "show dnodes"`
mlog=`taos -s "show mnodes"`
echo "$dlog" | tee -a dnode.log
echo "$mlog" | tee -a mnode.log
sleep 1s
done