Merge pull request #25856 from taosdata/test/3.0/TD-30164

Test/3.0/td 30164
This commit is contained in:
Alex Duan 2024-05-23 15:28:54 +08:00 committed by GitHub
commit a491037199
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 16 deletions

View File

@ -315,19 +315,22 @@ function run_thread() {
fi fi
if [ -n "$corefile" ]; then if [ -n "$corefile" ]; then
echo -e "\e[34m corefiles: $corefile \e[0m" echo -e "\e[34m corefiles: $corefile \e[0m"
fi
# scp build binary and unit test log
local build_dir=$log_dir/build_${hosts[index]} local build_dir=$log_dir/build_${hosts[index]}
local remote_build_dir="${workdirs[index]}/${DEBUGPATH}/build" local remote_build_dir="${workdirs[index]}/${DEBUGPATH}/build"
# if [ $ent -ne 0 ]; then local remote_unit_test_log_dir="${workdirs[index]}/${DEBUGPATH}/Testing/Temporary/"
# remote_build_dir="${workdirs[index]}/{DEBUGPATH}/build"
# fi
mkdir "$build_dir" 2>/dev/null mkdir "$build_dir" 2>/dev/null
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
# scp build binary
cmd="$scpcmd:${remote_build_dir}/* ${build_dir}/" cmd="$scpcmd:${remote_build_dir}/* ${build_dir}/"
echo "$cmd" echo "$cmd"
$cmd >/dev/null $cmd >/dev/null
cmd="$scpcmd:${remote_unit_test_log_dir}/* ${build_dir}/"
echo "$cmd"
$cmd >/dev/null
fi fi
fi
# get remote sim dir # get remote sim dir
local remote_sim_dir="${workdirs[index]}/tmp/thread_volume/$thread_no" local remote_sim_dir="${workdirs[index]}/tmp/thread_volume/$thread_no"
local tarcmd="sshpass -p ${passwords[index]} ssh -o StrictHostKeyChecking=no -r ${usernames[index]}@${hosts[index]}" local tarcmd="sshpass -p ${passwords[index]} ssh -o StrictHostKeyChecking=no -r ${usernames[index]}@${hosts[index]}"

View File

@ -39,7 +39,7 @@ class TDTestCase:
os.system("nohup taosBenchmark -y -B 1 -t 40 -S 1000 -n 10 -i 1000 -v 5 > /dev/null 2>&1 &") os.system("nohup taosBenchmark -y -B 1 -t 40 -S 1000 -n 10 -i 1000 -v 5 > /dev/null 2>&1 &")
time.sleep(10) time.sleep(10)
tdSql.query("use test") tdSql.execute("use test", queryTimes=100)
tdSql.query("create stream if not exists s1 trigger at_once ignore expired 0 ignore update 0 fill_history 1 into st1 as select _wstart,sum(voltage),groupid from meters partition by groupid interval(2s)") tdSql.query("create stream if not exists s1 trigger at_once ignore expired 0 ignore update 0 fill_history 1 into st1 as select _wstart,sum(voltage),groupid from meters partition by groupid interval(2s)")
tdLog.debug("========create stream and insert data ok========") tdLog.debug("========create stream and insert data ok========")
time.sleep(15) time.sleep(15)
@ -66,7 +66,7 @@ class TDTestCase:
os.system("taosBenchmark -d db -t 20 -v 6 -n 1000 -y > /dev/null 2>&1") os.system("taosBenchmark -d db -t 20 -v 6 -n 1000 -y > /dev/null 2>&1")
# create stream # create stream
tdSql.execute("use db") tdSql.execute("use db", queryTimes=100)
tdSql.execute("create stream stream1 fill_history 1 into sta as select count(*) as cnt from meters interval(10a);",show=True) tdSql.execute("create stream stream1 fill_history 1 into sta as select count(*) as cnt from meters interval(10a);",show=True)
time.sleep(5) time.sleep(5)

View File

@ -89,8 +89,8 @@ else
export LD_PRELOAD="$(realpath "$(gcc -print-file-name=libasan.so)") $(realpath "$(gcc -print-file-name=libstdc++.so)")" export LD_PRELOAD="$(realpath "$(gcc -print-file-name=libasan.so)") $(realpath "$(gcc -print-file-name=libstdc++.so)")"
echo "Preload AsanSo:" $? echo "Preload AsanSo:" $?
$* -a 2>$AsanFile $* -a 2> $AsanFile
cat $AsanFile
unset LD_PRELOAD unset LD_PRELOAD
for ((i = 1; i <= 20; i++)); do for ((i = 1; i <= 20; i++)); do
AsanFileLen=$(cat $AsanFile | wc -l) AsanFileLen=$(cat $AsanFile | wc -l)