fix case
This commit is contained in:
parent
feb5886ed2
commit
b2933ea244
|
@ -624,14 +624,11 @@ class TDTestCase:
|
||||||
self.__insert_data()
|
self.__insert_data()
|
||||||
self.all_test()
|
self.all_test()
|
||||||
|
|
||||||
#tdLog.printNoPrefix("==========step2:create table in rollup database")
|
tdLog.printNoPrefix("==========step2:create table in rollup database")
|
||||||
#tdSql.execute("create database db3 retentions 1s:4m,2s:8m,3s:12m")
|
tdSql.execute("create database db3 retentions 1s:4m,2s:8m,3s:12m")
|
||||||
#tdSql.execute("use db3")
|
tdSql.execute("use db3")
|
||||||
# self.__create_tb()
|
tdSql.execute(f"create stable stb1 ({PRIMARY_COL} timestamp, {INT_COL} int) tags (tag1 int) rollup(first) watermark 5s max_delay 1m sma({INT_COL}) ")
|
||||||
#tdSql.execute(f"create stable stb1 ({PRIMARY_COL} timestamp, {INT_COL} int) tags (tag1 int) rollup(first) watermark 5s max_delay 1m sma({INT_COL}) ")
|
self.all_test()
|
||||||
#self.all_test()
|
|
||||||
|
|
||||||
# self.__insert_data()
|
|
||||||
|
|
||||||
tdSql.execute("drop database if exists db1 ")
|
tdSql.execute("drop database if exists db1 ")
|
||||||
tdSql.execute("drop database if exists db2 ")
|
tdSql.execute("drop database if exists db2 ")
|
||||||
|
|
|
@ -65,7 +65,7 @@ class TDTestCase:
|
||||||
|
|
||||||
def init(self, conn, logSql):
|
def init(self, conn, logSql):
|
||||||
tdLog.debug(f"start to excute {__file__}")
|
tdLog.debug(f"start to excute {__file__}")
|
||||||
tdSql.init(conn.cursor(), True)
|
tdSql.init(conn.cursor(), False)
|
||||||
|
|
||||||
def __query_condition(self,tbname):
|
def __query_condition(self,tbname):
|
||||||
query_condition = []
|
query_condition = []
|
||||||
|
|
|
@ -49,7 +49,7 @@ def checkRunTimeError():
|
||||||
os.system("TASKKILL /F /IM taosd.exe")
|
os.system("TASKKILL /F /IM taosd.exe")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
fileName = "all"
|
fileName = "all"
|
||||||
deployPath = ""
|
deployPath = ""
|
||||||
masterIp = ""
|
masterIp = ""
|
||||||
|
@ -86,11 +86,11 @@ if __name__ == "__main__":
|
||||||
tdLog.printNoPrefix('-M create mnode numbers in clusters')
|
tdLog.printNoPrefix('-M create mnode numbers in clusters')
|
||||||
tdLog.printNoPrefix('-Q set queryPolicy in one dnode')
|
tdLog.printNoPrefix('-Q set queryPolicy in one dnode')
|
||||||
tdLog.printNoPrefix('-C create Dnode Numbers in one cluster')
|
tdLog.printNoPrefix('-C create Dnode Numbers in one cluster')
|
||||||
|
|
||||||
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
if key in ['-r', '--restart']:
|
if key in ['-r', '--restart']:
|
||||||
restart = True
|
restart = True
|
||||||
|
|
||||||
if key in ['-f', '--file']:
|
if key in ['-f', '--file']:
|
||||||
|
@ -184,7 +184,7 @@ if __name__ == "__main__":
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|
||||||
tdLog.info('stop All dnodes')
|
tdLog.info('stop All dnodes')
|
||||||
|
|
||||||
if masterIp == "":
|
if masterIp == "":
|
||||||
host = socket.gethostname()
|
host = socket.gethostname()
|
||||||
else:
|
else:
|
||||||
|
@ -298,7 +298,7 @@ if __name__ == "__main__":
|
||||||
config=tdDnodes.getSimCfgPath())
|
config=tdDnodes.getSimCfgPath())
|
||||||
tdSql.init(conn.cursor())
|
tdSql.init(conn.cursor())
|
||||||
tdSql.execute("create qnode on dnode 1")
|
tdSql.execute("create qnode on dnode 1")
|
||||||
tdSql.execute('alter local "queryPolicy" "%d"'%queryPolicy)
|
tdSql.execute('alter local "queryPolicy" "%d"'%queryPolicy)
|
||||||
tdSql.query("show local variables;")
|
tdSql.query("show local variables;")
|
||||||
for i in range(tdSql.queryRows):
|
for i in range(tdSql.queryRows):
|
||||||
if tdSql.queryResult[i][0] == "queryPolicy" :
|
if tdSql.queryResult[i][0] == "queryPolicy" :
|
||||||
|
@ -306,7 +306,7 @@ if __name__ == "__main__":
|
||||||
tdLog.success('alter queryPolicy to %d successfully'%queryPolicy)
|
tdLog.success('alter queryPolicy to %d successfully'%queryPolicy)
|
||||||
else :
|
else :
|
||||||
tdLog.debug(tdSql.queryResult)
|
tdLog.debug(tdSql.queryResult)
|
||||||
tdLog.exit("alter queryPolicy to %d failed"%queryPolicy)
|
tdLog.exit("alter queryPolicy to %d failed"%queryPolicy)
|
||||||
else :
|
else :
|
||||||
tdLog.debug("create an cluster with %s nodes and make %s dnode as independent mnode"%(dnodeNums,mnodeNums))
|
tdLog.debug("create an cluster with %s nodes and make %s dnode as independent mnode"%(dnodeNums,mnodeNums))
|
||||||
dnodeslist = cluster.configure_cluster(dnodeNums=dnodeNums,mnodeNums=mnodeNums)
|
dnodeslist = cluster.configure_cluster(dnodeNums=dnodeNums,mnodeNums=mnodeNums)
|
||||||
|
@ -334,8 +334,8 @@ if __name__ == "__main__":
|
||||||
print("check dnode ready")
|
print("check dnode ready")
|
||||||
except Exception as r:
|
except Exception as r:
|
||||||
print(r)
|
print(r)
|
||||||
|
|
||||||
|
|
||||||
if testCluster:
|
if testCluster:
|
||||||
tdLog.info("Procedures for testing cluster")
|
tdLog.info("Procedures for testing cluster")
|
||||||
if fileName == "all":
|
if fileName == "all":
|
||||||
|
@ -347,21 +347,21 @@ if __name__ == "__main__":
|
||||||
conn = taos.connect(
|
conn = taos.connect(
|
||||||
host,
|
host,
|
||||||
config=tdDnodes.getSimCfgPath())
|
config=tdDnodes.getSimCfgPath())
|
||||||
|
|
||||||
if fileName == "all":
|
if fileName == "all":
|
||||||
tdCases.runAllLinux(conn)
|
tdCases.runAllLinux(conn)
|
||||||
else:
|
else:
|
||||||
tdCases.runOneLinux(conn, fileName)
|
tdCases.runOneLinux(conn, fileName)
|
||||||
|
|
||||||
if restart:
|
if restart:
|
||||||
if fileName == "all":
|
if fileName == "all":
|
||||||
tdLog.info("not need to query ")
|
tdLog.info("not need to query ")
|
||||||
else:
|
else:
|
||||||
sp = fileName.rsplit(".", 1)
|
sp = fileName.rsplit(".", 1)
|
||||||
if len(sp) == 2 and sp[1] == "py":
|
if len(sp) == 2 and sp[1] == "py":
|
||||||
tdDnodes.stopAll()
|
tdDnodes.stopAll()
|
||||||
tdDnodes.start(1)
|
tdDnodes.start(1)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
conn = taos.connect( host, config=tdDnodes.getSimCfgPath())
|
conn = taos.connect( host, config=tdDnodes.getSimCfgPath())
|
||||||
tdLog.info("Procedures for tdengine deployed in %s" % (host))
|
tdLog.info("Procedures for tdengine deployed in %s" % (host))
|
||||||
tdLog.info("query test after taosd restart")
|
tdLog.info("query test after taosd restart")
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 6dccac192a2ae7dd78718ab926201aab5419327a
|
Subproject commit 7a94ffab45f08e16f09b3f430fe75d717054adb6
|
Loading…
Reference in New Issue