提交 c93cb979 编写于 作者: H Haojun Liao

other:merge 3.0

上级 78f03e99
......@@ -116,7 +116,7 @@ sql_error (select c1 from union_tb0 limit 1 union all select c1 from union_tb1 l
sql_error (select c1 from union_tb0 limit 1 union all select c1 from union_tb1 limit 1) limit 1
# sql with parenthese
sql (((select c1 from union_tb0)))
sql (select c1 from union_tb0)
if $rows != 10000 then
return -1
endi
......
......@@ -231,7 +231,7 @@ class TDTestCase:
if platform.system().lower() == 'windows':
os.system('ps -a | grep taos | awk \'{print $2}\' | xargs kill -9')
else:
os.system('pkill taos')
os.system('pkill -9 taos')
def stop(self):
tdSql.close()
......
from datetime import datetime
from platform import platform
import time
from typing import List, Any, Tuple
......@@ -83,6 +84,8 @@ class TDTestCase:
def del_old_datadir(self, filename):
cmd = f"sed -i '/^dataDir/d' {filename}"
if platform.system().lower() == 'darwin':
cmd = f"sed -i '' '/^dataDir/d' {filename}"
if os.system(cmd) != 0:
tdLog.exit(cmd)
......
......@@ -38,18 +38,7 @@ class TDTestCase:
elif i>=9:
tdSql.checkData(0, 0, np.max(floatData))
tdSql.query(f"select max(now()) from {dbname}.stb_1")
tdSql.checkRows(1)
tdSql.query(f"select last(ts) from {dbname}.stb_1")
lastTs = tdSql.getData(0, 0)
tdSql.query(f"select max(ts) from {dbname}.stb_1")
tdSql.checkData(0, 0, lastTs)
tdSql.query(f"select last(ts) from {dbname}.stb")
lastTs = tdSql.getData(0, 0)
tdSql.query(f"select max(ts) from {dbname}.stb")
tdSql.checkData(0, 0, lastTs)
tdSql.error(f"select max(now()) from {dbname}.stb_1")
tdSql.query(f"select max(col1) from {dbname}.stb_1 where col2<=5")
tdSql.checkData(0,0,5)
......@@ -78,13 +67,7 @@ class TDTestCase:
elif i>=9:
tdSql.checkData(0, 0, np.max(floatData))
tdSql.query(f"select max(now()) from {dbname}.ntb")
tdSql.checkRows(1)
tdSql.query(f"select last(ts) from {dbname}.ntb")
lastTs = tdSql.getData(0, 0)
tdSql.query(f"select max(ts) from {dbname}.ntb")
tdSql.checkData(0, 0, lastTs)
tdSql.error(f"select max(now()) from {dbname}.ntb")
tdSql.query(f"select max(col1) from {dbname}.ntb where col2<=5")
tdSql.checkData(0,0,5)
......
......@@ -181,7 +181,7 @@ class TDTestCase:
# bug need fix
tdSql.checkData(0,1,None)
tdSql.query(f"select c1 , twa(c1) from {dbname}.stb partition by c1 order by c1")
tdSql.query(f"select c1 , twa(c1) from {dbname}.sub_stb_1 partition by c1 order by c1")
tdSql.checkRows(11)
tdSql.checkData(0,1,None)
......
......@@ -37,6 +37,8 @@ class TDTestCase:
floatData.append(i + 0.1)
# max verifacation
tdSql.error(f"select min(now()) from {dbname}.stb_1")
tdSql.error(f"select min(ts) from {dbname}.stb_1")
tdSql.error(f"select min(col7) from {dbname}.stb_1")
tdSql.error(f"select min(col8) from {dbname}.stb_1")
tdSql.error(f"select min(col9) from {dbname}.stb_1")
......@@ -67,20 +69,9 @@ class TDTestCase:
tdSql.query(f"select min(col1) from {dbname}.stb_1 where col2>=5")
tdSql.checkData(0,0,5)
tdSql.query(f"select min(now()) from {dbname}.stb_1")
tdSql.checkRows(1)
tdSql.query(f"select first(ts) from {dbname}.stb_1")
firstTs = tdSql.getData(0, 0)
tdSql.query(f"select min(ts) from {dbname}.stb_1")
tdSql.checkData(0, 0, firstTs)
tdSql.query(f"select first(ts) from {dbname}.stb_1")
firstTs = tdSql.getData(0, 0)
tdSql.query(f"select min(ts) from {dbname}.stb_1")
tdSql.checkData(0, 0, firstTs)
tdSql.error(f"select min(now()) from {dbname}.stb_1")
tdSql.error(f"select min(ts) from {dbname}.stb_1")
tdSql.error(f"select min(col7) from {dbname}.stb_1")
tdSql.error(f"select min(col8) from {dbname}.stb_1")
tdSql.error(f"select min(col9) from {dbname}.stb_1")
......@@ -111,19 +102,8 @@ class TDTestCase:
tdSql.query(f"select min(col1) from {dbname}.stb where col2>=5")
tdSql.checkData(0,0,5)
tdSql.query(f"select min(now()) from {dbname}.stb_1")
tdSql.checkRows(1)
tdSql.query(f"select first(ts) from {dbname}.stb_1")
firstTs = tdSql.getData(0, 0)
tdSql.query(f"select min(ts) from {dbname}.stb_1")
tdSql.checkData(0, 0, firstTs)
tdSql.query(f"select first(ts) from {dbname}.stb_1")
firstTs = tdSql.getData(0, 0)
tdSql.query(f"select min(ts) from {dbname}.stb_1")
tdSql.checkData(0, 0, firstTs)
tdSql.error(f"select min(now()) from {dbname}.stb_1")
tdSql.error(f"select min(ts) from {dbname}.stb_1")
tdSql.error(f"select min(col7) from {dbname}.ntb")
tdSql.error(f"select min(col8) from {dbname}.ntb")
tdSql.error(f"select min(col9) from {dbname}.ntb")
......@@ -154,19 +134,6 @@ class TDTestCase:
tdSql.query(f"select min(col1) from {dbname}.ntb where col2>=5")
tdSql.checkData(0,0,5)
tdSql.query(f"select min(now()) from {dbname}.stb_1")
tdSql.checkRows(1)
tdSql.query(f"select first(ts) from {dbname}.stb_1")
firstTs = tdSql.getData(0, 0)
tdSql.query(f"select min(ts) from {dbname}.stb_1")
tdSql.checkData(0, 0, firstTs)
tdSql.query(f"select first(ts) from {dbname}.stb_1")
firstTs = tdSql.getData(0, 0)
tdSql.query(f"select min(ts) from {dbname}.stb_1")
tdSql.checkData(0, 0, firstTs)
def stop(self):
tdSql.close()
......
......@@ -124,7 +124,7 @@ class TDTestCase:
tdSql.checkData(0,1,4.500000000)
# mixup with other functions
tdSql.query(f"select twa(c1),twa(c2),max(c1),elapsed(ts) from {dbname}.stb1 ")
tdSql.query(f"select twa(c1),twa(c2),max(c1),elapsed(ts) from {dbname}.ct1 ")
tdSql.checkData(0,0,1.000000000)
tdSql.checkData(0,1,11111.000000000)
tdSql.checkData(0,2,1)
......
......@@ -325,7 +325,9 @@ class TDTestCase:
expectrowcnt = int(paraDict["rowsPerTbl"] * paraDict["ctbNum"] * (1 + 1/4 + 3/4))
elif self.snapshot == 1:
consumerId = 5
expectrowcnt = int(paraDict["rowsPerTbl"] * paraDict["ctbNum"] * (1 - 1/4 + 1/4 + 3/4))
# expectrowcnt = int(paraDict["rowsPerTbl"] * paraDict["ctbNum"] * (1 - 1/4 + 1/4 + 3/4))
# fix case: sometimes only 200 rows are deleted
expectrowcnt = int(paraDict["rowsPerTbl"] * paraDict["ctbNum"] * (1 + 1/4 + 3/4))
topicList = topicFromStb1
ifcheckdata = 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册