提交 b9eb9886 编写于 作者: haoranc's avatar haoranc

[TD11116]<test>:update testcase of taosdemo

上级 a16cbcb5
...@@ -218,9 +218,9 @@ python3 ./test.py -f perfbenchmark/bug3433.py ...@@ -218,9 +218,9 @@ python3 ./test.py -f perfbenchmark/bug3433.py
python3 ./test.py -f perfbenchmark/taosdemoInsert.py python3 ./test.py -f perfbenchmark/taosdemoInsert.py
#taosdemo #taosdemo
#python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJson.py python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
# python3 test.py -f tools/taosdemoAllTest/taosdemoTestQueryWithJson.py python3 test.py -f tools/taosdemoAllTest/taosdemoTestQueryWithJson.py
# python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertAllType.py python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertAllType.py
#query #query
python3 test.py -f query/distinctOneColTb.py python3 test.py -f query/distinctOneColTb.py
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
"super_tables": [{ "super_tables": [{
"name": "stb0", "name": "stb0",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 1000, "childtable_count": 11,
"childtable_prefix": "stb00_", "childtable_prefix": "stb00_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 1, "batch_create_tbl_num": 1,
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
{ {
"name": "stb1", "name": "stb1",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 1000, "childtable_count": 10,
"childtable_prefix": "stb01_", "childtable_prefix": "stb01_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 10, "batch_create_tbl_num": 10,
......
...@@ -48,21 +48,25 @@ class TDTestCase: ...@@ -48,21 +48,25 @@ class TDTestCase:
tdLog.info("taosd found in %s" % buildPath) tdLog.info("taosd found in %s" % buildPath)
binPath = buildPath+ "/build/bin/" binPath = buildPath+ "/build/bin/"
testcaseFilename = os.path.split(__file__)[-1]
os.system("rm -rf ./insert*_res.txt*")
os.system("rm -rf tools/taosdemoAllTest/%s.sql" % testcaseFilename )
# insert: create one or mutiple tables per sql and insert multiple rows per sql # insert: create one or mutiple tables per sql and insert multiple rows per sql
os.system("%staosdemo -f tools/taosdemoAllTest/insert-1s1tnt1r.json -y " % binPath) os.system("%staosdemo -f tools/taosdemoAllTest/insert-1s1tnt1r.json -y " % binPath)
tdSql.execute("use db") tdSql.execute("use db")
tdSql.query("select count (tbname) from stb0") tdSql.query("select count (tbname) from stb0")
tdSql.checkData(0, 0, 1000) tdSql.checkData(0, 0, 11)
tdSql.query("select count (tbname) from stb1") tdSql.query("select count (tbname) from stb1")
tdSql.checkData(0, 0, 1000) tdSql.checkData(0, 0, 10)
tdSql.query("select count(*) from stb00_0") tdSql.query("select count(*) from stb00_0")
tdSql.checkData(0, 0, 100) tdSql.checkData(0, 0, 100)
tdSql.query("select count(*) from stb0") tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 100000) tdSql.checkData(0, 0, 1100)
tdSql.query("select count(*) from stb01_1") tdSql.query("select count(*) from stb01_1")
tdSql.checkData(0, 0, 200) tdSql.checkData(0, 0, 200)
tdSql.query("select count(*) from stb1") tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 200000) tdSql.checkData(0, 0, 2000)
# restful connector insert data # restful connector insert data
os.system("%staosdemo -f tools/taosdemoAllTest/insertRestful.json -y " % binPath) os.system("%staosdemo -f tools/taosdemoAllTest/insertRestful.json -y " % binPath)
...@@ -349,9 +353,10 @@ class TDTestCase: ...@@ -349,9 +353,10 @@ class TDTestCase:
tdSql.query('show tables like \'YYY%\'') #child_table_exists = yes, auto_create_table varies = yes tdSql.query('show tables like \'YYY%\'') #child_table_exists = yes, auto_create_table varies = yes
tdSql.checkRows(20) tdSql.checkRows(20)
testcaseFilename = os.path.split(__file__)[-1] # rm useless files
os.system("rm -rf ./insert_res.txt") os.system("rm -rf ./insert*_res.txt*")
os.system("rm -rf tools/taosdemoAllTest/%s.sql" % testcaseFilename )
......
...@@ -232,7 +232,7 @@ class TDTestCase: ...@@ -232,7 +232,7 @@ class TDTestCase:
os.system("rm -rf tools/taosdemoAllTest/*.py.sql") os.system("rm -rf tools/taosdemoAllTest/*.py.sql")
os.system("rm -rf ./querySystemInfo*") os.system("rm -rf ./querySystemInfo*")
os.system("rm -rf ./query_res*") os.system("rm -rf ./query_res*")
# os.system("rm -rf ./all_query*") os.system("rm -rf ./all_query*")
os.system("rm -rf ./test_query_res0.txt") os.system("rm -rf ./test_query_res0.txt")
def stop(self): def stop(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册