test:add replica 3 for all testcases and frameworks

This commit is contained in:
chenhaoran 2022-10-31 14:41:59 +08:00
parent 9415ecb4e2
commit 851f34ff36
211 changed files with 282 additions and 251 deletions

View File

@ -63,14 +63,14 @@ class TDCases:
tdLog.info("total %d Linux test case(s) executed" % (runNum)) tdLog.info("total %d Linux test case(s) executed" % (runNum))
def runOneLinux(self, conn, fileName): def runOneLinux(self, conn, fileName, replicaVar):
testModule = self.__dynamicLoadModule(fileName) testModule = self.__dynamicLoadModule(fileName)
runNum = 0 runNum = 0
for tmp in self.linuxCases: for tmp in self.linuxCases:
if tmp.name.find(fileName) != -1: if tmp.name.find(fileName) != -1:
case = testModule.TDTestCase() case = testModule.TDTestCase()
case.init(conn, self._logSql) case.init(conn, self._logSql, replicaVar)
try: try:
case.run() case.run()
except Exception as e: except Exception as e:

View File

@ -14,7 +14,7 @@ class TDTestCase:
updatecfgDict = {'debugFlag': 143 ,"cDebugFlag":143,"uDebugFlag":143 ,"rpcDebugFlag":143 , "tmrDebugFlag":143 , updatecfgDict = {'debugFlag': 143 ,"cDebugFlag":143,"uDebugFlag":143 ,"rpcDebugFlag":143 , "tmrDebugFlag":143 ,
"jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143, "jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143,
"wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"udfDebugFlag":143} "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"udfDebugFlag":143}
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), True) tdSql.init(conn.cursor(), True)

View File

@ -22,7 +22,7 @@ class TDTestCase:
''' '''
return return
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -26,7 +26,7 @@ TS_TYPE_COL = [ TS_COL, ]
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -20,7 +20,7 @@ from util.sqlset import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.setsql = TDSetSql() self.setsql = TDSetSql()

View File

@ -20,7 +20,7 @@ from util.common import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.dbname = 'db' self.dbname = 'db'

View File

@ -108,7 +108,7 @@ class TDTestCase:
print ("===================: ", updatecfgDict) print ("===================: ", updatecfgDict)
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -110,7 +110,7 @@ class TDTestCase:
print ("===================: ", updatecfgDict) print ("===================: ", updatecfgDict)
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -110,7 +110,7 @@ class TDTestCase:
print ("===================: ", updatecfgDict) print ("===================: ", updatecfgDict)
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -284,7 +284,7 @@ class TDTestCase:
print ("===================: ", updatecfgDict) print ("===================: ", updatecfgDict)
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -44,7 +44,7 @@ class TDTestCase:
# print ("===================: ", updatecfgDict) # print ("===================: ", updatecfgDict)
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -10,7 +10,7 @@ from util.dnodes import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -173,7 +173,7 @@ class TDTestCase:
print ("===================: ", updatecfgDict) print ("===================: ", updatecfgDict)
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -13,7 +13,7 @@ import subprocess
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), logSql) tdSql.init(conn.cursor(), logSql)

View File

@ -15,7 +15,7 @@ class TDTestCase:
updatecfgDict = {'debugFlag': 143, "cDebugFlag": 143, "uDebugFlag": 143, "rpcDebugFlag": 143, "tmrDebugFlag": 143, updatecfgDict = {'debugFlag': 143, "cDebugFlag": 143, "uDebugFlag": 143, "rpcDebugFlag": 143, "tmrDebugFlag": 143,
"jniDebugFlag": 143, "simDebugFlag": 143, "dDebugFlag": 143, "dDebugFlag": 143, "vDebugFlag": 143, "mDebugFlag": 143, "qDebugFlag": 143, "jniDebugFlag": 143, "simDebugFlag": 143, "dDebugFlag": 143, "dDebugFlag": 143, "vDebugFlag": 143, "mDebugFlag": 143, "qDebugFlag": 143,
"wDebugFlag": 143, "sDebugFlag": 143, "tsdbDebugFlag": 143, "tqDebugFlag": 143, "fsDebugFlag": 143, "fnDebugFlag": 143 ,"udf":0} "wDebugFlag": 143, "sDebugFlag": 143, "tsdbDebugFlag": 143, "tqDebugFlag": 143, "fsDebugFlag": 143, "fnDebugFlag": 143 ,"udf":0}
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), logSql) tdSql.init(conn.cursor(), logSql)

View File

@ -15,7 +15,7 @@ class TDTestCase:
updatecfgDict = {'debugFlag': 143, "cDebugFlag": 143, "uDebugFlag": 143, "rpcDebugFlag": 143, "tmrDebugFlag": 143, updatecfgDict = {'debugFlag': 143, "cDebugFlag": 143, "uDebugFlag": 143, "rpcDebugFlag": 143, "tmrDebugFlag": 143,
"jniDebugFlag": 143, "simDebugFlag": 143, "dDebugFlag": 143, "dDebugFlag": 143, "vDebugFlag": 143, "mDebugFlag": 143, "qDebugFlag": 143, "jniDebugFlag": 143, "simDebugFlag": 143, "dDebugFlag": 143, "dDebugFlag": 143, "vDebugFlag": 143, "mDebugFlag": 143, "qDebugFlag": 143,
"wDebugFlag": 143, "sDebugFlag": 143, "tsdbDebugFlag": 143, "tqDebugFlag": 143, "fsDebugFlag": 143, "fnDebugFlag": 143 ,"udf":1} "wDebugFlag": 143, "sDebugFlag": 143, "tsdbDebugFlag": 143, "tqDebugFlag": 143, "fsDebugFlag": 143, "fnDebugFlag": 143 ,"udf":1}
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), logSql) tdSql.init(conn.cursor(), logSql)

View File

@ -15,7 +15,7 @@ import threading
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), logSql) tdSql.init(conn.cursor(), logSql)

View File

@ -12,7 +12,7 @@ import subprocess
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), logSql) tdSql.init(conn.cursor(), logSql)

View File

@ -154,7 +154,7 @@ class User:
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -11,7 +11,7 @@ from util.cases import *
from util.dnodes import * from util.dnodes import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(),logSql) tdSql.init(conn.cursor(),logSql)
self.buffer_boundary = [3,4097,8193,12289,16384] self.buffer_boundary = [3,4097,8193,12289,16384]

View File

@ -20,7 +20,7 @@ from util.sqlset import *
from util import constant from util import constant
from util.common import * from util.common import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.setsql = TDSetSql() self.setsql = TDSetSql()

View File

@ -21,7 +21,7 @@ from util.common import *
from util.sqlset import * from util.sqlset import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.setsql = TDSetSql() self.setsql = TDSetSql()

View File

@ -142,7 +142,7 @@ class BSMAschema:
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), False) tdSql.init(conn.cursor(), False)
self.precision = "ms" self.precision = "ms"

View File

@ -44,7 +44,7 @@ NTBNAME = "nt1"
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), False) tdSql.init(conn.cursor(), False)

View File

@ -28,7 +28,7 @@ class TDTestCase:
"jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143, "jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143,
"wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"fnDebugFlag":143} "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"fnDebugFlag":143}
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(), logSql) tdSql.init(conn.cursor(), logSql)

View File

@ -31,7 +31,7 @@ from util.common import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.special_name = ['!','@','#','$','%','^','&','*','(',')','[',']','{','}',\ self.special_name = ['!','@','#','$','%','^','&','*','(',')','[',']','{','}',\

View File

@ -23,7 +23,7 @@ from util.common import *
from util.sqlset import TDSetSql from util.sqlset import TDSetSql
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.dbname = 'db_test' self.dbname = 'db_test'

View File

@ -29,7 +29,7 @@ if platform.system().lower() == 'windows':
sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='utf8') sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='utf8')
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(), False) tdSql.init(conn.cursor(), False)
self._conn = conn self._conn = conn

View File

@ -62,7 +62,7 @@ class TDTestCase:
return buildPath return buildPath
# init # init
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
# tdSql.prepare() # tdSql.prepare()

View File

@ -8,7 +8,7 @@ import threading
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(), logSql) tdSql.init(conn.cursor(), logSql)

View File

@ -7,7 +7,7 @@ import time
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(), logSql) tdSql.init(conn.cursor(), logSql)
self.dbname = "test" self.dbname = "test"

View File

@ -57,7 +57,7 @@ DATA_PRE2 = f"data2"
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), False) tdSql.init(conn.cursor(), False)
self.taos_cfg_path = tdDnodes.dnodes[0].cfgPath self.taos_cfg_path = tdDnodes.dnodes[0].cfgPath

View File

@ -60,7 +60,7 @@ class TDTestCase:
return buildPath return buildPath
# init # init
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
# tdSql.init(conn.cursor()) # tdSql.init(conn.cursor())
# tdSql.prepare() # tdSql.prepare()

View File

@ -24,7 +24,7 @@ import threading
import json import json
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(), logSql) tdSql.init(conn.cursor(), logSql)
self._conn = conn self._conn = conn

View File

@ -28,7 +28,7 @@ if platform.system().lower() == 'windows':
sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='utf8') sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='utf8')
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(), False) tdSql.init(conn.cursor(), False)
self._conn = conn self._conn = conn

View File

@ -20,7 +20,7 @@ from util.sql import *
from util.common import * from util.common import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
# prepare data # prepare data

View File

@ -18,7 +18,7 @@ from util.common import *
class TDTestCase: class TDTestCase:
updatecfgDict = {'ttlUnit':5,'ttlPushInterval':3} updatecfgDict = {'ttlUnit':5,'ttlPushInterval':3}
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.ntbname = 'ntb' self.ntbname = 'ntb'

View File

@ -5,7 +5,7 @@ from util.common import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.ts = 1537146000000 self.ts = 1537146000000

View File

@ -57,7 +57,7 @@ class TDTestCase:
return buildPath return buildPath
# init # init
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
# tdSql.prepare() # tdSql.prepare()

View File

@ -57,7 +57,7 @@ class TDTestCase:
return buildPath return buildPath
# init # init
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
# tdSql.prepare() # tdSql.prepare()

View File

@ -134,7 +134,7 @@ class SMAschema:
class TDTestCase: class TDTestCase:
updatecfgDict = {"querySmaOptimize": 1} updatecfgDict = {"querySmaOptimize": 1}
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), False) tdSql.init(conn.cursor(), False)
self.precision = "ms" self.precision = "ms"

View File

@ -21,7 +21,7 @@ from util.sql import *
from util.common import * from util.common import *
from util.sqlset import TDSetSql from util.sqlset import TDSetSql
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(),logSql) tdSql.init(conn.cursor(),logSql)
self.setsql = TDSetSql() self.setsql = TDSetSql()

View File

@ -23,7 +23,7 @@ from util.common import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.dbname = 'db_test' self.dbname = 'db_test'

View File

@ -7,7 +7,7 @@ from util.sqlset import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.setsql = TDSetSql() self.setsql = TDSetSql()

View File

@ -4,7 +4,7 @@ from util.cases import *
from util.gettime import * from util.gettime import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.get_time = GetTime() self.get_time = GetTime()

View File

@ -10,7 +10,7 @@ import os
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.rowNum = 10 self.rowNum = 10

View File

@ -10,7 +10,7 @@ from util.sqlset import TDSetSql
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.setsql = TDSetSql() self.setsql = TDSetSql()

View File

@ -10,7 +10,7 @@ import pandas as pd
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.today_date = datetime.datetime.strptime(datetime.datetime.now().strftime("%Y-%m-%d"), "%Y-%m-%d") self.today_date = datetime.datetime.strptime(datetime.datetime.now().strftime("%Y-%m-%d"), "%Y-%m-%d")

View File

@ -14,7 +14,7 @@ class TDTestCase:
# "jniDebugFlag": 143, "simDebugFlag": 143, "dDebugFlag": 143, "dDebugFlag": 143, "vDebugFlag": 143, "mDebugFlag": 143, "qDebugFlag": 143, # "jniDebugFlag": 143, "simDebugFlag": 143, "dDebugFlag": 143, "dDebugFlag": 143, "vDebugFlag": 143, "mDebugFlag": 143, "qDebugFlag": 143,
# "wDebugFlag": 143, "sDebugFlag": 143, "tsdbDebugFlag": 143, "tqDebugFlag": 143, "fsDebugFlag": 143, "udfDebugFlag": 143} # "wDebugFlag": 143, "sDebugFlag": 143, "tsdbDebugFlag": 143, "tqDebugFlag": 143, "fsDebugFlag": 143, "udfDebugFlag": 143}
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), False) tdSql.init(conn.cursor(), False)
self.tb_nums = 10 self.tb_nums = 10

View File

@ -14,7 +14,7 @@ class TDTestCase:
# "jniDebugFlag": 143, "simDebugFlag": 143, "dDebugFlag": 143, "dDebugFlag": 143, "vDebugFlag": 143, "mDebugFlag": 143, "qDebugFlag": 143, # "jniDebugFlag": 143, "simDebugFlag": 143, "dDebugFlag": 143, "dDebugFlag": 143, "vDebugFlag": 143, "mDebugFlag": 143, "qDebugFlag": 143,
# "wDebugFlag": 143, "sDebugFlag": 143, "tsdbDebugFlag": 143, "tqDebugFlag": 143, "fsDebugFlag": 143, "udfDebugFlag": 143} # "wDebugFlag": 143, "sDebugFlag": 143, "tsdbDebugFlag": 143, "tqDebugFlag": 143, "fsDebugFlag": 143, "udfDebugFlag": 143}
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), False) tdSql.init(conn.cursor(), False)
self.tb_nums = 10 self.tb_nums = 10

View File

@ -18,7 +18,7 @@ import numpy as np
from util.sqlset import TDSetSql from util.sqlset import TDSetSql
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(),False) tdSql.init(conn.cursor(),False)
self.rowNum = 10 self.rowNum = 10

View File

@ -10,7 +10,7 @@ class TDTestCase:
# updatecfgDict = {'debugFlag': 143 ,"cDebugFlag":143,"uDebugFlag":143 ,"rpcDebugFlag":143 , "tmrDebugFlag":143 , # updatecfgDict = {'debugFlag': 143 ,"cDebugFlag":143,"uDebugFlag":143 ,"rpcDebugFlag":143 , "tmrDebugFlag":143 ,
# "jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143, # "jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143,
# "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"udfDebugFlag":143} # "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"udfDebugFlag":143}
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), False) tdSql.init(conn.cursor(), False)
self.setsql = TDSetSql() self.setsql = TDSetSql()

View File

@ -9,7 +9,7 @@ from util.cases import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -21,7 +21,7 @@ from util.sqlset import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.dbname = 'db_test' self.dbname = 'db_test'

View File

@ -12,7 +12,7 @@ from util.dnodes import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.dbname = "db" self.dbname = "db"

View File

@ -13,7 +13,7 @@ class TDTestCase:
# "jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143, # "jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143,
# "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"udfDebugFlag":143} # "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"udfDebugFlag":143}
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -26,7 +26,7 @@ TS_TYPE_COL = [TS_COL]
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -12,7 +12,7 @@ class TDTestCase:
# updatecfgDict = {'debugFlag': 143 ,"cDebugFlag":143,"uDebugFlag":143 ,"rpcDebugFlag":143 , "tmrDebugFlag":143 , # updatecfgDict = {'debugFlag': 143 ,"cDebugFlag":143,"uDebugFlag":143 ,"rpcDebugFlag":143 , "tmrDebugFlag":143 ,
# "jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143, # "jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143,
# "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"udfDebugFlag":143} # "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"udfDebugFlag":143}
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), False) tdSql.init(conn.cursor(), False)

View File

@ -26,7 +26,7 @@ TS_TYPE_COL = [ TS_COL, ]
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -26,7 +26,7 @@ TS_TYPE_COL = [ TS_COL, ]
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -26,7 +26,7 @@ TS_TYPE_COL = [ TS_COL, ]
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -26,7 +26,7 @@ TS_TYPE_COL = [ TS_COL, ]
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -3,7 +3,7 @@ from util.sql import *
from util.cases import * from util.cases import *
from util.sqlset import * from util.sqlset import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(),False) tdSql.init(conn.cursor(),False)
self.setsql = TDSetSql() self.setsql = TDSetSql()

View File

@ -4,7 +4,7 @@ from util.sql import *
from util.cases import * from util.cases import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -26,7 +26,7 @@ from util.dnodes import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(), logSql) tdSql.init(conn.cursor(), logSql)

View File

@ -11,7 +11,7 @@ import random
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), False) tdSql.init(conn.cursor(), False)

View File

@ -6,7 +6,7 @@ import numpy as np
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -9,7 +9,7 @@ from util.cases import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -8,7 +8,7 @@ import random
class TDTestCase: class TDTestCase:
updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 }
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.vnode_disbutes = None self.vnode_disbutes = None

View File

@ -9,7 +9,7 @@ import platform
class TDTestCase: class TDTestCase:
updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 }
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.vnode_disbutes = None self.vnode_disbutes = None

View File

@ -8,7 +8,7 @@ import random
class TDTestCase: class TDTestCase:
updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 }
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.vnode_disbutes = None self.vnode_disbutes = None

View File

@ -9,7 +9,7 @@ class TDTestCase:
updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 }
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.vnode_disbutes = None self.vnode_disbutes = None

View File

@ -9,7 +9,7 @@ class TDTestCase:
updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 }
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.vnode_disbutes = None self.vnode_disbutes = None

View File

@ -8,7 +8,7 @@ import random
class TDTestCase: class TDTestCase:
updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 }
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to execute {__file__}") tdLog.debug(f"start to execute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.vnode_disbutes = None self.vnode_disbutes = None

View File

@ -9,7 +9,7 @@ import math
class TDTestCase: class TDTestCase:
updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 }
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.vnode_disbutes = None self.vnode_disbutes = None

View File

@ -9,7 +9,7 @@ import platform
class TDTestCase: class TDTestCase:
updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 }
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
self.vnode_disbutes = None self.vnode_disbutes = None

View File

@ -20,7 +20,7 @@ from util.sql import *
from util.dnodes import * from util.dnodes import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(), logSql) tdSql.init(conn.cursor(), logSql)

View File

@ -30,7 +30,7 @@ ALL_COL = [ INT_COL, BINT_COL, SINT_COL, TINT_COL, FLOAT_COL, DOUBLE_COL, BOOL_C
DBNAME = "db" DBNAME = "db"
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), logSql) tdSql.init(conn.cursor(), logSql)

View File

@ -23,7 +23,7 @@ import numpy as np
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -12,7 +12,7 @@ DBNAME = "db"
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -26,7 +26,7 @@ from util.dnodes import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -11,7 +11,7 @@ import random
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), False) tdSql.init(conn.cursor(), False)
self.tb_nums = 10 self.tb_nums = 10

View File

@ -5,7 +5,7 @@ from util.cases import *
DBNAME = "db" DBNAME = "db"
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -142,7 +142,7 @@ class Hsgschema:
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), False) tdSql.init(conn.cursor(), False)
@ -304,7 +304,9 @@ class TDTestCase:
err_sqls.append( Hsgschema( col=INT_COL, bin_type="USER_INPUT", user_input="[0,3,6,9,'a']", normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="USER_INPUT", user_input="[0,3,6,9,'a']", normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="USER_INPUT", user_input="['a']", normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="USER_INPUT", user_input="['a']", normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="linear_bin", linear_bin=['{"start": 1, "width": 3, "count": 10, "infinity": false}'], normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="linear_bin", linear_bin=['{"start": 1, "width": 3, "count": 10, "infinity": false}'], normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="linear_bin", linear_bin='[{"start": 1, "width": 3, "count": 10, "infinity": false}]', normalized=1 ) ) # err_sqls.append( Hsgschema( col=INT_COL, bin_type="linear_bin", linear_bin='{"start": 1, "width": 2, "count": 10, "infinity": false}', normalized=1 , "123" ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="linear_bin", linear_bin='{"start": 1, "width": float("inf"), "count": 10, "infinity": false}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="linear_bin", linear_bin='{"start": float("inf"), "width": 10, "count": 10, "infinity": false}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="linear_bin", linear_bin='{"begin": 1, "width": 3, "count": 10, "infinity": false}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="linear_bin", linear_bin='{"begin": 1, "width": 3, "count": 10, "infinity": false}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="linear_bin", linear_bin='{"start": 1, "length": 3, "count": 10, "infinity": false}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="linear_bin", linear_bin='{"start": 1, "length": 3, "count": 10, "infinity": false}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="linear_bin", linear_bin='{"start": 1, "width": 3, "num": 10, "infinity": false}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="linear_bin", linear_bin='{"start": 1, "width": 3, "num": 10, "infinity": false}', normalized=1 ) )
@ -322,6 +324,11 @@ class TDTestCase:
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin=['{"start": 1, "factor": 4, "count": 4, "infinity": true}'], normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin=['{"start": 1, "factor": 4, "count": 4, "infinity": true}'], normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='[{"start": 1, "factor": 4, "count": 4, "infinity": true}]', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='[{"start": 1, "factor": 4, "count": 4, "infinity": true}]', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"begin": 1, "factor": 4, "count": 4, "infinity": true}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"begin": 1, "factor": 4, "count": 4, "infinity": true}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": -10, "count": 4, "infinity": true}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 0, "count": 4, "infinity": true}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 0, "count": 4, "infinity": true}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": -10, "width": NULL, "count": 4, "infinity": true}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "step": 4, "count": 4, "infinity": true}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "step": 4, "count": 4, "infinity": true}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 4, "num": 4, "infinity": true}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 4, "num": 4, "infinity": true}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 4, "count": 4, "witgnull": true}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 4, "count": 4, "witgnull": true}', normalized=1 ) )
@ -335,6 +342,13 @@ class TDTestCase:
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": -10, "count": 4, "infinity": true}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": -10, "count": 4, "infinity": true}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": 0, "infinity": true}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": 0, "infinity": true}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": -10, "infinity": true}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": -10, "infinity": true}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": 10001, "infinity": true}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": "123", "infinity": true}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": float("inf"), "infinity": false}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": float("inf"), "count": 10, "infinity": false}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": float("inf"), "factor": 10, "count": 10, "infinity": false}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": float("-inf"), "factor": 10, "count": 10, "infinity": false}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": 10, "infinity": "true"}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": 10, "infinity": "true"}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": 10, "infinity": null}', normalized=1 ) ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": 10, "infinity": null}', normalized=1 ) )
err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": 10, "infinity": false}', where_clause=f"count({INT_COL}) >= 0 ") ) err_sqls.append( Hsgschema( col=INT_COL, bin_type="log_bin", log_bin='{"start": 1, "factor": 10, "count": 10, "infinity": false}', where_clause=f"count({INT_COL}) >= 0 ") )
@ -404,6 +418,21 @@ class TDTestCase:
tdSql.checkData(0, 0, '{"lower_bin":0, "upper_bin":3, "count":3}') tdSql.checkData(0, 0, '{"lower_bin":0, "upper_bin":3, "count":3}')
tdSql.checkData(1, 0, '{"lower_bin":3, "upper_bin":6, "count":3}') tdSql.checkData(1, 0, '{"lower_bin":3, "upper_bin":6, "count":3}')
tdSql.checkData(2, 0, '{"lower_bin":6, "upper_bin":9, "count":3}') tdSql.checkData(2, 0, '{"lower_bin":6, "upper_bin":9, "count":3}')
#error sql
# tdSql.error(f"SELECT HISTOGRAM(c_int, 'linear_bin', '{"start": -200, "width": 100, "count": 20, "infinity": false}', 0 ,1 ) from {dbname}.nt1 where c_int < 10")
# tdSql.error(f"SELECT HISTOGRAM(c_int, 'linear_bin', '{"start": -200, "width": 100, "count": -10, "infinity": false}', 0 ) from {dbname}.nt1 where c_int < 10")
# tdSql.error(f"SELECT HISTOGRAM(c_int, 'linear_bin', '{"start": -200, "width": 100, "count": 1001, "infinity": false}', 0 ) from {dbname}.nt1 where c_int < 10")
tdSql.error(f"SELECT HISTOGRAM(c_int, 'log_bin', '[0,3,6,9]', 0 ,1 ) from {dbname}.nt1 where c_int < 10")
tdSql.error(f"SELECT HISTOGRAM(c_int, 'USER_INPUT', '[0,3,6,9]', 0 ,1 ) from {dbname}.nt1 where c_int < 10")
tdSql.error(f"SELECT HISTOGRAM(c_int, 'USER_INPUT', '[0,3,6,9]' ) from {dbname}.nt1 where c_int < 10")
tdSql.error(f"SELECT HISTOGRAM('123', 'USER_INPUT', '[0,3,6,9]', 0 ) from {dbname}.nt1 where c_int < 10")
tdSql.error(f"SELECT HISTOGRAM('123', 123 ,123 ,123 ) from {dbname}.nt1 where c_int < 10")
tdSql.error(f"SELECT HISTOGRAM(123, '123' ,'123' ,'123' ) from {dbname}.nt1 where c_int < 10")
def all_test(self, dbname=DBNAME): def all_test(self, dbname=DBNAME):
self.test_histogram(dbname) self.test_histogram(dbname)

View File

@ -31,7 +31,7 @@ class TDTestCase:
updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 }
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -9,7 +9,7 @@ from util.cases import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
#tdSql.init(conn.cursor()) #tdSql.init(conn.cursor())
tdSql.init(conn.cursor(), logSql) # output sql.txt file tdSql.init(conn.cursor(), logSql) # output sql.txt file

View File

@ -11,7 +11,7 @@ import random ,math
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), False) tdSql.init(conn.cursor(), False)
self.tb_nums = 10 self.tb_nums = 10

View File

@ -63,7 +63,7 @@ class DataSet:
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), False) tdSql.init(conn.cursor(), False)

View File

@ -26,7 +26,7 @@ TS_TYPE_COL = [ TS_COL, ]
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), False) tdSql.init(conn.cursor(), False)

View File

@ -13,7 +13,7 @@ class TDTestCase:
''' '''
return return
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(), False) tdSql.init(conn.cursor(), False)

View File

@ -30,7 +30,7 @@ class TDTestCase:
''' '''
return return
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
self.testcasePath = os.path.split(__file__)[0] self.testcasePath = os.path.split(__file__)[0]
self.testcaseFilename = os.path.split(__file__)[-1] self.testcaseFilename = os.path.split(__file__)[-1]
# os.system("rm -rf %s/%s.sql" % (self.testcasePath,self.testcaseFilename)) # os.system("rm -rf %s/%s.sql" % (self.testcasePath,self.testcaseFilename))

View File

@ -8,7 +8,7 @@ import numpy as np
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -11,7 +11,7 @@ import random
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor(), True) tdSql.init(conn.cursor(), True)
self.tb_nums = 10 self.tb_nums = 10

View File

@ -29,7 +29,7 @@ ALL_COL = [ INT_COL, BINT_COL, SINT_COL, TINT_COL, FLOAT_COL, DOUBLE_COL, BOOL_C
DBNAME = "db" DBNAME = "db"
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -23,7 +23,7 @@ DBNAME = "db"
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -11,7 +11,7 @@ from util.cases import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -22,7 +22,7 @@ TS_TYPE_COL = [TS_COL]
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -27,7 +27,7 @@ DBNAME = "db"
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -27,7 +27,7 @@ from util.dnodes import *
dbname = 'db' dbname = 'db'
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

View File

@ -6,7 +6,7 @@ import numpy as np
class TDTestCase: class TDTestCase:
updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 } updatecfgDict = {"maxTablesPerVnode":2 ,"minTablesPerVnode":2,"tableIncStepPerVnode":2 }
def init(self, conn, logSql): def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())

Some files were not shown because too many files have changed in this diff Show More