fix: init migrate to run init
This commit is contained in:
parent
9550d2f550
commit
a860793c99
|
@ -37,6 +37,7 @@ class TBase:
|
||||||
# save param
|
# save param
|
||||||
self.replicaVar = int(replicaVar)
|
self.replicaVar = int(replicaVar)
|
||||||
tdSql.init(conn.cursor(), True)
|
tdSql.init(conn.cursor(), True)
|
||||||
|
self.tmpdir = "tmp"
|
||||||
|
|
||||||
# record server information
|
# record server information
|
||||||
self.dnodeNum = 0
|
self.dnodeNum = 0
|
||||||
|
|
|
@ -6,4 +6,13 @@ for i in `find tools/benchmark/basic/ -name "*.py"`
|
||||||
((count=count+1))
|
((count=count+1))
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "benchmark/basic count=$count \n"
|
echo "benchmark/basic count=$count \n"
|
||||||
|
|
||||||
|
|
||||||
|
for i in `find tools/taosdump/native/ -name "*.py"`
|
||||||
|
do printf "\n\n ***** cnt=$count python3 test.py -f $i *****\n\n"
|
||||||
|
python3 test.py -f $i
|
||||||
|
((count=count+1))
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "taosdump/native count=$count \n"
|
|
@ -22,14 +22,6 @@ from frame import *
|
||||||
|
|
||||||
|
|
||||||
class TDTestCase(TBase):
|
class TDTestCase(TBase):
|
||||||
def init(self, conn, logSql):
|
|
||||||
tdLog.debug("start to execute %s" % __file__)
|
|
||||||
tdSql.init(conn.cursor(), logSql)
|
|
||||||
|
|
||||||
self.ts = 1538548685000
|
|
||||||
self.numberOfTables = 10000
|
|
||||||
self.numberOfRecords = 100
|
|
||||||
|
|
||||||
def checkCommunity(self):
|
def checkCommunity(self):
|
||||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||||
if "community" in selfPath:
|
if "community" in selfPath:
|
||||||
|
@ -39,6 +31,10 @@ class TDTestCase(TBase):
|
||||||
|
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
self.ts = 1538548685000
|
||||||
|
self.numberOfTables = 10000
|
||||||
|
self.numberOfRecords = 100
|
||||||
|
|
||||||
if not os.path.exists("./taosdumptest/tmp1"):
|
if not os.path.exists("./taosdumptest/tmp1"):
|
||||||
os.makedirs("./taosdumptest/tmp1")
|
os.makedirs("./taosdumptest/tmp1")
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -25,15 +25,6 @@ import random
|
||||||
|
|
||||||
|
|
||||||
class TDTestCase(TBase):
|
class TDTestCase(TBase):
|
||||||
def init(self, conn, logSql):
|
|
||||||
tdLog.debug("start to execute %s" % __file__)
|
|
||||||
tdSql.init(conn.cursor(), logSql)
|
|
||||||
|
|
||||||
self.ts = 1601481600000
|
|
||||||
self.numberOfTables = 1
|
|
||||||
self.numberOfRecords = 150
|
|
||||||
|
|
||||||
|
|
||||||
def generateString(self, length):
|
def generateString(self, length):
|
||||||
chars = string.ascii_uppercase + string.ascii_lowercase
|
chars = string.ascii_uppercase + string.ascii_lowercase
|
||||||
v = ""
|
v = ""
|
||||||
|
@ -42,6 +33,10 @@ class TDTestCase(TBase):
|
||||||
return v
|
return v
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
self.ts = 1601481600000
|
||||||
|
self.numberOfTables = 1
|
||||||
|
self.numberOfRecords = 150
|
||||||
|
|
||||||
if not os.path.exists("./taosdumptest/tmp"):
|
if not os.path.exists("./taosdumptest/tmp"):
|
||||||
os.makedirs("./taosdumptest/tmp")
|
os.makedirs("./taosdumptest/tmp")
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -22,14 +22,6 @@ from frame import *
|
||||||
|
|
||||||
|
|
||||||
class TDTestCase(TBase):
|
class TDTestCase(TBase):
|
||||||
def init(self, conn, logSql):
|
|
||||||
tdLog.debug("start to execute %s" % __file__)
|
|
||||||
tdSql.init(conn.cursor(), logSql)
|
|
||||||
|
|
||||||
self.ts = 1625068800000000000 # this is timestamp "2021-07-01 00:00:00"
|
|
||||||
self.numberOfTables = 10
|
|
||||||
self.numberOfRecords = 100
|
|
||||||
|
|
||||||
def checkCommunity(self):
|
def checkCommunity(self):
|
||||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||||
if "community" in selfPath:
|
if "community" in selfPath:
|
||||||
|
@ -92,6 +84,9 @@ class TDTestCase(TBase):
|
||||||
print("other time precision not valid , please check! ")
|
print("other time precision not valid , please check! ")
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
self.ts = 1625068800000000000 # this is timestamp "2021-07-01 00:00:00"
|
||||||
|
self.numberOfTables = 10
|
||||||
|
self.numberOfRecords = 100
|
||||||
|
|
||||||
# clear envs
|
# clear envs
|
||||||
os.system("rm -rf ./taosdumptest/")
|
os.system("rm -rf ./taosdumptest/")
|
||||||
|
|
|
@ -100,7 +100,7 @@ class TDTestCase(TBase):
|
||||||
|
|
||||||
tdSql.query("select * from st where ubntag is null")
|
tdSql.query("select * from st where ubntag is null")
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
tdSql.checkData(0, 0, 0)
|
tdSql.checkData(0, 0, 1640000000000)
|
||||||
tdSql.checkData(0, 1, None)
|
tdSql.checkData(0, 1, None)
|
||||||
tdSql.checkData(0, 2, None)
|
tdSql.checkData(0, 2, None)
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ class TDTestCase(TBase):
|
||||||
|
|
||||||
tdSql.query("select * from st where usntag is null")
|
tdSql.query("select * from st where usntag is null")
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
tdSql.checkData(0, 0, 0)
|
tdSql.checkData(0, 0, 1640000000000)
|
||||||
tdSql.checkData(0, 1, None)
|
tdSql.checkData(0, 1, None)
|
||||||
tdSql.checkData(0, 2, None)
|
tdSql.checkData(0, 2, None)
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ class TDTestCase(TBase):
|
||||||
|
|
||||||
tdSql.query("select * from st where usntag is null")
|
tdSql.query("select * from st where usntag is null")
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
tdSql.checkData(0, 0, 0)
|
tdSql.checkData(0, 0, 1640000000000)
|
||||||
tdSql.checkData(0, 1, None)
|
tdSql.checkData(0, 1, None)
|
||||||
tdSql.checkData(0, 2, None)
|
tdSql.checkData(0, 2, None)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue