提交 52840c15 编写于 作者: W wenzhouwww

[TD-12344]<test> : add test case for coredump session group by , and update case for TD-12344

上级 00d10400
......@@ -95,9 +95,23 @@ class TDTestCase:
cfg_path = self.getcfgPath()
print(cfg_path)
tdSql.execute('select elapsed(ts,10s) from testdb.st where ts>=\"2015-01-01 00:00:00.000\" and ts < \"2015-01-01 00:10:00.000\" session(ts,1d) group by tbname;') # session not support super table
taos_cmd1= "taos -c %s -s 'select elapsed(ts,10s) from testdb.st where ts>=\"2015-01-01 00:00:00.000\" and ts < \"2015-01-01 00:10:00.000\" session(ts,1d) group by tbname;' " % (cfg_path)
_ = subprocess.check_output(taos_cmd1, shell=True).decode("utf-8")
tdSql.execute('select elapsed(ts,10s) from testdb.st where ts>=\"2015-01-01 00:00:00.000\" and ts < \"2015-01-01 00:10:00.000\" session(ts,1d) group by tbname;')
datas = tdSql.getResult('select elapsed(ts,10s) from testdb.st where ts>=\"2015-01-01 00:00:00.000\" and ts < \"2015-01-01 00:10:00.000\" session(ts,1d) group by tbname;')
table_names = ["sub_%s"%str(i) for i in range(10)]
# print(table_names)
for index , table_name in enumerate(table_names):
tdSql.query("select elapsed(ts,10s) from testdb.%s where ts>=\"2015-01-01 00:00:00.000\" and ts < \"2015-01-01 00:10:00.000\" session(ts,1d) ;"%table_name)
# print(datas)
tdSql.checkData(0,1,datas[index][1])
for i in range(10):
taos_cmd1= "taos -c %s -s 'select elapsed(ts,10s) from testdb.st where ts>=\"2015-01-01 00:00:00.000\" and ts < \"2015-01-01 00:10:00.000\" session(ts,1d) group by tbname;' " % (cfg_path)
# print(taos_cmd1)
_ = subprocess.check_output(taos_cmd1, shell=True).decode("utf-8")
def stop(self):
......
......@@ -6,4 +6,4 @@ python3 test.py -f 2-query/TD-11256.py
python3 ./test.py -f 2-query/TD-11389.py
python3 ./test.py -f 2-query/TD-11945_crash.py
python3 ./test.py -f 2-query/TD-12340-12342.py
python3 ./test.py -f 2-query/TD-12344.py
\ No newline at end of file
python3 ./test.py -f 2-query/TD-12344.py
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册