40 lines
909 B
Python
40 lines
909 B
Python
|
|
import taos
|
|
import sys
|
|
import time
|
|
import socket
|
|
import os
|
|
import threading
|
|
|
|
from util.log import *
|
|
from util.sql import *
|
|
from util.cases import *
|
|
from util.dnodes import *
|
|
from util.common import *
|
|
sys.path.append("./7-tmq")
|
|
from tmqCommon import *
|
|
|
|
class TDTestCase:
|
|
def init(self, conn, logSql, replicaVar=1):
|
|
self.replicaVar = int(replicaVar)
|
|
tdLog.debug(f"start to excute {__file__}")
|
|
tdSql.init(conn.cursor())
|
|
|
|
def run(self):
|
|
tdSql.prepare()
|
|
buildPath = tdCom.getBuildPath()
|
|
|
|
cmdStr1 = '%s/build/bin/replay_test'%(buildPath)
|
|
tdLog.info(cmdStr1)
|
|
result = os.system(cmdStr1)
|
|
|
|
if result != 0:
|
|
tdLog.exit("tmq_replay error!")
|
|
|
|
def stop(self):
|
|
tdSql.close()
|
|
tdLog.success(f"{__file__} successfully executed")
|
|
|
|
tdCases.addLinux(__file__, TDTestCase())
|
|
tdCases.addWindows(__file__, TDTestCase())
|