From a0f8df898b861b62f2b3e6f8e9514833b2625052 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 3 Nov 2021 11:59:14 +0800 Subject: [PATCH] test script --- test/common.sh | 10 ++++----- test/main.go | 5 +++-- test/test.sh | 55 -------------------------------------------------- test/test2.sh | 8 -------- test/test3.sh | 10 --------- test/test4.sh | 11 ---------- 6 files changed, 8 insertions(+), 91 deletions(-) delete mode 100644 test/test.sh delete mode 100644 test/test2.sh delete mode 100644 test/test3.sh delete mode 100644 test/test4.sh diff --git a/test/common.sh b/test/common.sh index 6f6875afd..3f2bbbbf6 100644 --- a/test/common.sh +++ b/test/common.sh @@ -1,5 +1,5 @@ uidCount=7 -messageCount=100 +messageCount=10000 cmd1num=1 cmd2num=1 @@ -8,7 +8,7 @@ cmd4num=1 cmd5num=1 cmd6num=1 cmd7num=1 -APIADDR="http://1.14.194.38:10000" -WSADDR="ws://1.14.194.38:17778" -REGISTERADDR="http://1.14.194.38:10000/auth/user_register" -TOKENADDR="http://1.14.194.38:10000/auth/user_token" +APIADDR="http://127.0.0.1:10000" +WSADDR="ws://127.0.0.1:17778" +REGISTERADDR="http://127.0.0.1:10000/auth/user_register" +TOKENADDR="http://127.0.0.1:10000/auth/user_token" diff --git a/test/main.go b/test/main.go index fb1aa78ab..2532674b5 100644 --- a/test/main.go +++ b/test/main.go @@ -324,7 +324,7 @@ var ( // myuid, maxuid, msgnum func main() { - cmdfile := "./cmd.txt" + //cmdfile := "./cmd.txt" uid := flag.Int("uid", 1, "RpcToken default listen port 10800") uidCount := flag.Int("uid_count", 2, "RpcToken default listen port 10800") messageCount := flag.Int("message_count", 1, "RpcToken default listen port 10800") @@ -350,7 +350,8 @@ func main() { runRigister(strMyUid) token := runGetToken(strMyUid) - cmd := GetCmd(myUid, cmdfile) + //cmd := GetCmd(myUid, cmdfile) + cmd := 2 fmt.Println("getcmd value ", cmd) switch cmd { diff --git a/test/test.sh b/test/test.sh deleted file mode 100644 index 7192441a6..000000000 --- a/test/test.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash -killall -9 open_im_test_client -uidCount=7 -messageCount=100 - -cmd1num=1 -cmd2num=1 -cmd3num=1 -cmd4num=1 -cmd5num=1 -cmd6num=1 -cmd7num=1 - - -for ((i = 1; i <= ${cmd1num}; i++)); do -echo 1 >> cmd.txt -done - - -for ((i = 1; i <= ${cmd2num}; i++)); do -echo 2 >> cmd.txt -done - - -for ((i = 1; i <= ${cmd3num}; i++)); do -echo 3 >> cmd.txt -done - - -for ((i = 1; i <= ${cmd4num}; i++)); do -echo 4 >> cmd.txt -done - - -for ((i = 1; i <= ${cmd5num}; i++)); do -echo 5 >> cmd.txt -done - - -for ((i = 1; i <= ${cmd6num}; i++)); do -echo 6 >> cmd.txt -done - -for ((i = 1; i <= ${cmd7num}; i++)); do -echo 7 >> cmd.txt -done - - - - - -for ((i = 1; i <= ${uidCount}; i++)); do - nohup ./open_im_test_client -uid $i -uid_count ${uidCount} -message_count ${messageCount} >>./openIM.log.$i 2>&1 & -done - diff --git a/test/test2.sh b/test/test2.sh deleted file mode 100644 index 22979ea73..000000000 --- a/test/test2.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -killall -9 open_im_test_client -source ./common.sh - -for ((i = 1; i <= ${uidCount}; i++)); do - nohup ./open_im_test_client -uid $i -uid_count ${uidCount} -message_count ${messageCount} >>./openIM.log.$i 2>&1 & -done - diff --git a/test/test3.sh b/test/test3.sh deleted file mode 100644 index 29483b0be..000000000 --- a/test/test3.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -killall -9 open_im_test_client -source ./common.sh - - - -for ((i = 1; i <= ${uidCount}; i++)); do - nohup ./open_im_test_client -uid $i -uid_count ${uidCount} -message_count ${messageCount} >>./openIM.log.$i 2>&1 & -done - diff --git a/test/test4.sh b/test/test4.sh deleted file mode 100644 index 3ee18ce20..000000000 --- a/test/test4.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -killall -9 open_im_test_client - -messageCount=0 - - - -for ((i = 1; i <= ${uidCount}; i++)); do - nohup ./open_im_test_client -uid $i -uid_count ${uidCount} -message_count ${messageCount} >>./openIM.log.$i 2>&1 & -done -