From 46905c402a11e81b8c81a6f6d5093d7c5c2027e1 Mon Sep 17 00:00:00 2001 From: tomchon Date: Fri, 23 Apr 2021 11:25:08 +0800 Subject: [PATCH] [TD-3453]:modify filepath in scripts --- .../taosdemoAllTest/TD-3453/query-interrupt.json | 4 ++-- .../taosdemoAllTest/TD-3453/query-interrupt.py | 7 ++++--- .../tools/taosdemoAllTest/TD-3453/queryall.json | 14 ++++++++++---- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/tests/pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.json b/tests/pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.json index 433d279825..5e53bd7e7d 100644 --- a/tests/pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.json +++ b/tests/pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.json @@ -35,13 +35,13 @@ "super_tables": [{ "name": "stb0", "child_table_exists":"no", - "childtable_count": 100, + "childtable_count": 60, "childtable_prefix": "stb00_", "auto_create_table": "no", "batch_create_tbl_num": 20, "data_source": "rand", "insert_mode": "taosc", - "insert_rows": 150000, + "insert_rows": 100000, "childtable_limit": -1, "childtable_offset":0, "multi_thread_write_one_tbl": "no", diff --git a/tests/pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.py b/tests/pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.py index 270bfd8b60..1401716da9 100644 --- a/tests/pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.py +++ b/tests/pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.py @@ -52,15 +52,15 @@ class TDTestCase: binPath = buildPath+ "/build/bin/" # # insert 1000w rows in stb0 - os.system("%staosdemo -f tools/taosdemoAllTest/query-interrupt.json -y " % binPath) + os.system("%staosdemo -f tools/taosdemoAllTest/TD-3453/query-interrupt.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0,60) tdSql.query("select count(*) from stb0") tdSql.checkData(0, 0, 6000000) - os.system('%staosdemo -f tools/taosdemoAllTest/queryall.json -y & ' % binPath) + os.system('%staosdemo -f tools/taosdemoAllTest/TD-3453/queryall.json -y & ' % binPath) time.sleep(2) - query_pid = int(subprocess.getstatusoutput('ps aux|grep "taosdemoAllTest/queryall.json" |grep -v "grep"|awk \'{print $2}\'')[1]) + query_pid = int(subprocess.getstatusoutput('ps aux|grep "TD-3453/queryall.json" |grep -v "grep"|awk \'{print $2}\'')[1]) taosd_cpu_load_1 = float(subprocess.getstatusoutput('top -n 1 -b -p $(ps aux|grep "bin/taosd -c"|grep -v "grep" |awk \'{print $2}\')|awk \'END{print}\' |awk \'{print $9}\'')[1]) if taosd_cpu_load_1 > 10.0 : os.system("kill -9 %d" % query_pid) @@ -78,6 +78,7 @@ class TDTestCase: tdSql.checkData(0, 0, "%d" % suc_kill) os.system("rm -rf querySystemInfo*") os.system("rm -rf insert_res.txt") + os.system("rm -rf insert_res.txt") def stop(self): tdSql.close() diff --git a/tests/pytest/tools/taosdemoAllTest/TD-3453/queryall.json b/tests/pytest/tools/taosdemoAllTest/TD-3453/queryall.json index bbc3b9717c..a92906fa73 100644 --- a/tests/pytest/tools/taosdemoAllTest/TD-3453/queryall.json +++ b/tests/pytest/tools/taosdemoAllTest/TD-3453/queryall.json @@ -7,8 +7,14 @@ "password": "taosdata", "confirm_parameter_prompt": "no", "databases": "db", - "specified_table_query": - {"query_interval":1, "concurrent":1, - "sqls": [{"sql": "select * from stb0", "result": ""}] - } + "specified_table_query":{ + "query_interval":1, + "concurrent":1, + "sqls":[ + { + "sql": "select * from stb0", + "result": "" + } + ] + } } \ No newline at end of file -- GitLab