Merge pull request #12668 from taosdata/test/chr/TD-14699

test:modify testcase that test replica 3
This commit is contained in:
Hui Li 2022-05-19 16:21:02 +08:00 committed by GitHub
commit 4852ba28ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 206 additions and 178 deletions

View File

@ -31,7 +31,7 @@ if $data[0][4] != ready then
goto check_dnode_ready goto check_dnode_ready
endi endi
#sql connect sql connect
sql create dnode $hostname port 7200 sql create dnode $hostname port 7200
sql create dnode $hostname port 7300 sql create dnode $hostname port 7300
sql create dnode $hostname port 7400 sql create dnode $hostname port 7400
@ -83,7 +83,7 @@ print $data(db)[13] $data(db)[14] $data(db)[15] $data(db)[16] $data(db)[17] $dat
if $rows != 3 then if $rows != 3 then
return -1 return -1
endi endi
if $data(db)[19] != ready then if $data(db)[19] != nostrict then
goto check_db_ready goto check_db_ready
endi endi
@ -93,49 +93,48 @@ $loop_cnt = 0
check_vg_ready: check_vg_ready:
$loop_cnt = $loop_cnt + 1 $loop_cnt = $loop_cnt + 1
sleep 200 sleep 200
if $loop_cnt == 10 then if $loop_cnt == 40 then
print ====> vgroups not ready! print ====> vgroups not ready!
return -1 return -1
endi endi
sql show vgroups sql show vgroups
print ===> rows: $rows print ===> rows: $rows
print $data(2)[0] $data(2)[1] $data(2)[2] $data(2)[3] $data(2)[4] $data(2)[5] $data(2)[6] $data(2)[7] $data(2)[8] $data(2)[9] $data(2)[10] $data(2)[11] $data(2)[12] $data(2)[13]
print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] $data[0][7] $data[0][8] $data[0][9] $data[10][6] $data[0][11] $data[0][12] $data[0][13] print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] $data[0][7] $data[0][8] $data[0][9] $data[10][6] $data[0][11] $data[0][12] $data[0][13]
if $rows != $vgroups then if $rows != $vgroups then
return -1 return -1
endi endi
if $data[0][4] == LEADER then if $data[0][4] == LEADER then
if $data[0][6] != FLLOWER then if $data[0][6] != FOLLOWER then
goto check_vg_ready goto check_vg_ready
endi endi
if $data[0][8] != FLLOWER then if $data[0][8] != FOLLOWER then
goto check_vg_ready goto check_vg_ready
endi endi
print ---- vgroup $data[0][0] leader locate on dnode $data[0][3] print ---- vgroup $data[0][0] leader locate on dnode $data[0][3]
goto vg_ready goto vg_ready
endi elif $data[0][6] == LEADER then
if $data[0][6] == LEADER then if $data[0][4] != FOLLOWER then
if $data[0][4] != FLLOWER then
goto check_vg_ready goto check_vg_ready
endi endi
if $data[0][8] != FLLOWER then if $data[0][8] != FOLLOWER then
goto check_vg_ready goto check_vg_ready
endi endi
print ---- vgroup $data[0][0] leader locate on dnode $data[0][5] print ---- vgroup $data[0][0] leader locate on dnode $data[0][5]
goto vg_ready goto vg_ready
endi elif $data[0][8] == LEADER then
if $data[0][8] == LEADER then if $data[0][4] != FOLLOWER then
if $data[0][4] != FLLOWER then
goto check_vg_ready goto check_vg_ready
endi endi
if $data[0][6] != FLLOWER then if $data[0][6] != FOLLOWER then
goto check_vg_ready goto check_vg_ready
endi endi
print ---- vgroup $data[0][0] leader locate on dnode $data[0][7] print ---- vgroup $data[0][0] leader locate on dnode $data[0][7]
goto vg_ready goto vg_ready
else
goto check_vg_ready
endi endi
vg_ready:
vg_ready:
print ====> create stable/child table print ====> create stable/child table
sql create table stb (ts timestamp, c1 int, c2 float, c3 binary(10)) tags (t1 int) sql create table stb (ts timestamp, c1 int, c2 float, c3 binary(10)) tags (t1 int)
@ -185,7 +184,7 @@ print ====> create a normal table for interaction between main and back threads
sql create table interaction (ts timestamp, flag binary(10), childrows int, stbrows int) sql create table interaction (ts timestamp, flag binary(10), childrows int, stbrows int)
print ====> start to run_back to insert data print ====> start to run_back to insert data
run_back tsim/tmq/insertDataByRunBack.sim run_back tsim/sync/insertDataByRunBack.sim
print ====> waiting insert thread starting insert data print ====> waiting insert thread starting insert data
@ -239,34 +238,34 @@ if $rows != $vgroups then
return -1 return -1
endi endi
if $data[0][4] == LEADER then if $data[0][4] == LEADER then
if $data[0][6] != FLLOWER then if $data[0][6] != FOLLOWER then
goto check_vg_ready_2 goto check_vg_ready_2
endi endi
if $data[0][8] != FLLOWER then if $data[0][8] != FOLLOWER then
goto check_vg_ready_2 goto check_vg_ready_2
endi endi
print ---- vgroup $data[0][0] leader switch to dnode $data[0][3] print ---- vgroup $data[0][0] leader switch to dnode $data[0][3]
goto vg_ready_2 goto vg_ready_2
endi elif $data[0][6] == LEADER then
if $data[0][6] == LEADER then if $data[0][4] != FOLLOWER then
if $data[0][4] != FLLOWER then
goto check_vg_ready_2 goto check_vg_ready_2
endi endi
if $data[0][8] != FLLOWER then if $data[0][8] != FOLLOWER then
goto check_vg_ready_2 goto check_vg_ready_2
endi endi
print ---- vgroup $data[0][0] leader switch to dnode $data[0][5] print ---- vgroup $data[0][0] leader switch to dnode $data[0][5]
goto vg_ready_2 goto vg_ready_2
endi elif $data[0][8] == LEADER then
if $data[0][8] == LEADER then if $data[0][4] != FOLLOWER then
if $data[0][4] != FLLOWER then
goto check_vg_ready_2 goto check_vg_ready_2
endi endi
if $data[0][6] != FLLOWER then if $data[0][6] != FOLLOWER then
goto check_vg_ready_2 goto check_vg_ready_2
endi endi
print ---- vgroup $data[0][0] leader switch to dnode $data[0][7] print ---- vgroup $data[0][0] leader switch to dnode $data[0][7]
goto vg_ready_2 goto vg_ready_2
else
goto check_vg_ready_2
endi endi
vg_ready_2: vg_ready_2:
@ -344,28 +343,28 @@ if $rows != $vgroups then
return -1 return -1
endi endi
if $data[0][4] == LEADER then if $data[0][4] == LEADER then
if $data[0][6] != FLLOWER then if $data[0][6] != FOLLOWER then
goto check_vg_ready_1 goto check_vg_ready_1
endi endi
if $data[0][8] != FLLOWER then if $data[0][8] != FOLLOWER then
goto check_vg_ready_1 goto check_vg_ready_1
endi endi
goto vg_ready_1 goto vg_ready_1
endi endi
if $data[0][6] == LEADER then if $data[0][6] == LEADER then
if $data[0][4] != FLLOWER then if $data[0][4] != FOLLOWER then
goto check_vg_ready_1 goto check_vg_ready_1
endi endi
if $data[0][8] != FLLOWER then if $data[0][8] != FOLLOWER then
goto check_vg_ready_1 goto check_vg_ready_1
endi endi
goto vg_ready_1 goto vg_ready_1
endi endi
if $data[0][8] == LEADER then if $data[0][8] == LEADER then
if $data[0][4] != FLLOWER then if $data[0][4] != FOLLOWER then
goto check_vg_ready_1 goto check_vg_ready_1
endi endi
if $data[0][6] != FLLOWER then if $data[0][6] != FOLLOWER then
goto check_vg_ready_1 goto check_vg_ready_1
endi endi
goto vg_ready_1 goto vg_ready_1

View File

@ -13,7 +13,7 @@
import sys import sys
import os import os
import threading import threading as thd
import multiprocessing as mp import multiprocessing as mp
from numpy.lib.function_base import insert from numpy.lib.function_base import insert
import taos import taos
@ -30,7 +30,10 @@ class TDTestCase:
# #
# --------------- main frame ------------------- # --------------- main frame -------------------
# #
clientCfgDict = {'queryproxy': '1'}
clientCfgDict["queryproxy"] = '2'
updatecfgDict = {'clientCfg': {}}
updatecfgDict["clientCfg"] = clientCfgDict
def caseDescription(self): def caseDescription(self):
''' '''
limit and offset keyword function test cases; limit and offset keyword function test cases;
@ -63,53 +66,13 @@ class TDTestCase:
# self.create_tables(); # self.create_tables();
self.ts = 1500000000000 self.ts = 1500000000000
# run case
def run(self):
# # test base case
# self.test_case1()
# tdLog.debug(" LIMIT test_case1 ............ [OK]")
# test case
# self.test_case2()
# tdLog.debug(" LIMIT test_case2 ............ [OK]")
# test case
self.test_case3()
tdLog.debug(" LIMIT test_case3 ............ [OK]")
# stop # stop
def stop(self): def stop(self):
tdSql.close() tdSql.close()
tdLog.success("%s successfully executed" % __file__) tdLog.success("%s successfully executed" % __file__)
# --------------- case -------------------
# create tables # --------------- case -------------------
def create_tables(self,dbname,stbname,count):
tdSql.execute("use %s" %dbname)
tdSql.execute("create stable %s(ts timestamp, c1 int, c2 binary(10)) tags(t1 int)"%stbname)
pre_create = "create table"
sql = pre_create
tdLog.debug("doing create one stable %s and %d child table in %s ..." %(stbname, count ,dbname))
# print(time.time())
exeStartTime=time.time()
for i in range(count):
sql += " %s_%d using %s tags(%d)"%(stbname,i,stbname,i+1)
if i >0 and i%3000 == 0:
tdSql.execute(sql)
sql = pre_create
# print(time.time())
# end sql
if sql != pre_create:
tdSql.execute(sql)
exeEndTime=time.time()
spendTime=exeEndTime-exeStartTime
speedCreate=count/spendTime
tdLog.debug("spent %.2fs to create 1 stable and %d table, create speed is %.2f table/s... [OK]"% (spendTime,count,speedCreate))
return
def newcur(self,host,cfg): def newcur(self,host,cfg):
user = "root" user = "root"
@ -120,28 +83,23 @@ class TDTestCase:
print(cur) print(cur)
return cur return cur
def new_create_tables(self,dbname,vgroups,stbname,tcountStart,tcountStop): # create tables
host = "localhost" def create_tables(self,host,dbname,stbname,count):
buildPath = self.getBuildPath() buildPath = self.getBuildPath()
config = buildPath+ "../sim/dnode1/cfg/" config = buildPath+ "../sim/dnode1/cfg/"
tsql=self.newcur(host,config) tsql=self.newcur(host,config)
tsql.execute("drop database if exists %s"%dbname)
tsql.execute("create database %s vgroups %d"%(dbname,vgroups))
tsql.execute("use %s" %dbname) tsql.execute("use %s" %dbname)
tsql.execute("create stable %s(ts timestamp, c1 int, c2 binary(10)) tags(t1 int)"%stbname)
pre_create = "create table" pre_create = "create table"
sql = pre_create sql = pre_create
tcountStop=int(tcountStop) count=int(count)
tcountStart=int(tcountStart)
count=tcountStop-tcountStart
tdLog.debug("doing create one stable %s and %d child table in %s ..." %(stbname, count ,dbname)) tdLog.debug("doing create one stable %s and %d child table in %s ..." %(stbname, count ,dbname))
# print(time.time()) # print(time.time())
exeStartTime=time.time() exeStartTime=time.time()
# print(type(tcountStop),type(tcountStart)) # print(type(tcountStop),type(tcountStart))
for i in range(tcountStart,tcountStop): for i in range(0,count):
sql += " %s_%d using %s tags(%d)"%(stbname,i,stbname,i+1) sql += " %s_%d using %s tags(%d)"%(stbname,i,stbname,i+1)
if i >0 and i%20000 == 0: if i >0 and i%20000 == 0:
# print(sql) # print(sql)
@ -158,11 +116,78 @@ class TDTestCase:
# tdLog.debug("spent %.2fs to create 1 stable and %d table, create speed is %.2f table/s... [OK]"% (spendTime,count,speedCreate)) # tdLog.debug("spent %.2fs to create 1 stable and %d table, create speed is %.2f table/s... [OK]"% (spendTime,count,speedCreate))
return return
def mutiThread_create_tables(self,host,dbname,stbname,vgroups,threadNumbers,count):
buildPath = self.getBuildPath()
config = buildPath+ "../sim/dnode1/cfg/"
tsql=self.newcur(host,config)
tdLog.debug("create database %s"%dbname)
tsql.execute("drop database if exists %s"%dbname)
tsql.execute("create database %s vgroups %d"%(dbname,vgroups))
tsql.execute("use %s" %dbname)
count=int(count)
threads = []
for i in range(threadNumbers):
tsql.execute("create stable %s%d(ts timestamp, c1 int, c2 binary(10)) tags(t1 int)"%(stbname,i))
threads.append(thd.Thread(target=self.create_tables, args=(host, dbname, stbname+"%d"%i, count,)))
start_time = time.time()
for tr in threads:
tr.start()
for tr in threads:
tr.join()
end_time = time.time()
spendTime=end_time-start_time
speedCreate=count/spendTime
tdLog.debug("spent %.2fs to create %d stable and %d table, create speed is %.2f table/s... [OK]"% (spendTime,threadNumbers,threadNumbers*count,speedCreate))
return
# def create_tables(self,host,dbname,stbname,vgroups,tcountStart,tcountStop):
# insert data # insert data
def insert_data(self, dbname, stbname, ts_start, tcountStart,tcountStop,rowCount): def insert_data(self, host, dbname, stbname, ts_start,rowCount):
tdSql.execute("use %s" %dbname) buildPath = self.getBuildPath()
config = buildPath+ "../sim/dnode1/cfg/"
tsql=self.newcur(host,config)
tdLog.debug("ready to inser data")
tsql.execute("use %s" %dbname)
pre_insert = "insert into "
sql = pre_insert
tcount=int(tcount)
allRows=tcount*rowCount
tdLog.debug("doing insert data into stable-index:%s rows:%d ..."%(stbname, allRows))
exeStartTime=time.time()
for i in range(0,tcount):
sql += " %s_%d values "%(stbname,i)
for j in range(rowCount):
sql += "(%d, %d, 'taos_%d') "%(ts_start + j*1000, j, j)
if j >0 and j%5000 == 0:
# print(sql)
tdSql.execute(sql)
sql = "insert into %s_%d values " %(stbname,i)
# end sql
if sql != pre_insert:
# print(sql)
tdSql.execute(sql)
exeEndTime=time.time()
spendTime=exeEndTime-exeStartTime
speedInsert=allRows/spendTime
# tdLog.debug("spent %.2fs to INSERT %d rows , insert rate is %.2f rows/s... [OK]"% (spendTime,allRows,speedInsert))
tdLog.debug("INSERT TABLE DATA ............ [OK]")
return
def mutiThread_insert_data(self, host, dbname, stbname, threadNumbers, ts_start, tcountStart,tcountStop,rowCount):
buildPath = self.getBuildPath()
config = buildPath+ "../sim/dnode1/cfg/"
tsql=self.newcur(host,config)
tdLog.debug("ready to inser data")
tsql.execute("use %s" %dbname)
pre_insert = "insert into " pre_insert = "insert into "
sql = pre_insert sql = pre_insert
tcount=tcountStop-tcountStart tcount=tcountStop-tcountStart
@ -187,8 +212,30 @@ class TDTestCase:
# tdLog.debug("spent %.2fs to INSERT %d rows , insert rate is %.2f rows/s... [OK]"% (spendTime,allRows,speedInsert)) # tdLog.debug("spent %.2fs to INSERT %d rows , insert rate is %.2f rows/s... [OK]"% (spendTime,allRows,speedInsert))
tdLog.debug("INSERT TABLE DATA ............ [OK]") tdLog.debug("INSERT TABLE DATA ............ [OK]")
buildPath = self.getBuildPath()
config = buildPath+ "../sim/dnode1/cfg/"
tsql=self.newcur(host,config)
tsql.execute("use %s" %dbname)
count=int(count)
threads = []
for i in range(threadNumbers):
tsql.execute("create stable %s%d(ts timestamp, c1 int, c2 binary(10)) tags(t1 int)"%(stbname,i))
threads.append(thd.Thread(target=self.create_tables, args=(host, dbname, stbname+"%d"%i, count,)))
start_time = time.time()
for tr in threads:
tr.start()
for tr in threads:
tr.join()
end_time = time.time()
spendTime=end_time-start_time
speedCreate=count/spendTime
tdLog.debug("spent %.2fs to create %d stable and %d table, create speed is %.2f table/s... [OK]"% (spendTime,threadNumbers,threadNumbers*count,speedCreate))
return return
def taosBench(self,jsonFile): def taosBench(self,jsonFile):
buildPath = self.getBuildPath() buildPath = self.getBuildPath()
if (buildPath == ""): if (buildPath == ""):
@ -199,16 +246,10 @@ class TDTestCase:
os.system("%s -f %s -y " %(taosBenchbin,jsonFile)) os.system("%s -f %s -y " %(taosBenchbin,jsonFile))
return return
def taosBenchCreate(self,host,dropdb,dbname,stbname,vgroups,threadNumbers,count): def taosBenchCreate(self,host,dropdb,dbname,stbname,vgroups,processNumbers,count):
# count=50000 # count=50000
buildPath = self.getBuildPath() buildPath = self.getBuildPath()
if (buildPath == ""):
tdLog.exit("taosd not found!")
else:
tdLog.info("taosd found in %s" % buildPath)
taosBenchbin = buildPath+ "/build/bin/taosBenchmark"
buildPath = self.getBuildPath()
config = buildPath+ "../sim/dnode1/cfg/" config = buildPath+ "../sim/dnode1/cfg/"
tsql=self.newcur(host,config) tsql=self.newcur(host,config)
@ -222,8 +263,7 @@ class TDTestCase:
tsql.execute("use %s" %dbname) tsql.execute("use %s" %dbname)
threads = [] threads = []
# threadNumbers=2 for i in range(processNumbers):
for i in range(threadNumbers):
jsonfile="1-insert/Vgroups%d%d.json"%(vgroups,i) jsonfile="1-insert/Vgroups%d%d.json"%(vgroups,i)
os.system("cp -f 1-insert/manyVgroups.json %s"%(jsonfile)) os.system("cp -f 1-insert/manyVgroups.json %s"%(jsonfile))
os.system("sed -i 's/\"name\": \"db\",/\"name\": \"%s\",/g' %s"%(dbname,jsonfile)) os.system("sed -i 's/\"name\": \"db\",/\"name\": \"%s\",/g' %s"%(dbname,jsonfile))
@ -246,68 +286,15 @@ class TDTestCase:
return return
# test case1 base # test case1 base
def test_case1(self): def test_case1(self):
tdLog.debug("-----create database and tables test------- ") tdLog.debug("-----create database and muti-thread create tables test------- ")
tdSql.execute("drop database if exists db1") #host,dbname,stbname,vgroups,threadNumbers,tcountStart,tcountStop
tdSql.execute("drop database if exists db4") self.mutiThread_create_tables(host="localhost",dbname="db2",stbname="stb2", vgroups=1, threadNumbers=5, count=10000)
tdSql.execute("drop database if exists db6")
tdSql.execute("drop database if exists db8")
tdSql.execute("drop database if exists db12")
tdSql.execute("drop database if exists db16")
#create database and tables;
# tdSql.execute("create database db11 vgroups 1")
# # self.create_tables("db1", "stb1", 30*10000)
# tdSql.execute("use db1")
# tdSql.execute("create stable stb1(ts timestamp, c1 int, c2 binary(10)) tags(t1 int)")
# tdSql.execute("create database db12 vgroups 1")
# # self.create_tables("db1", "stb1", 30*10000)
# tdSql.execute("use db1")
# t1 = threading.Thread(target=self.new_create_tables("db1", "stb1", 15*10000), args=(1,))
# t2 = threading.Thread(target=self.new_create_tables("db1", "stb1", 15*10000), args=(2,))
# t1 = mp.Process(target=self.new_create_tables, args=("db1", "stb1", 0,count/2,))
# t2 = mp.Process(target=self.new_create_tables, args=("db1", "stb1", count/2,count,))
count=50000
vgroups=1
threads = []
threadNumbers=2
for i in range(threadNumbers):
threads.append(mp.Process(target=self.new_create_tables, args=("db1%d"%i, vgroups, "stb1", 0,count,)))
start_time = time.time()
for tr in threads:
tr.start()
for tr in threads:
tr.join()
end_time = time.time()
spendTime=end_time-start_time
speedCreate=count/spendTime
tdLog.debug("spent %.2fs to create 1 stable and %d table, create speed is %.2f table/s... [OK]"% (spendTime,count,speedCreate))
# self.new_create_tables("db1", "stb1", 15*10000)
# self.new_create_tables("db1", "stb1", 15*10000)
# tdSql.execute("create database db4 vgroups 4")
# self.create_tables("db4", "stb4", 30*10000)
# tdSql.execute("create database db6 vgroups 6")
# self.create_tables("db6", "stb6", 30*10000)
# tdSql.execute("create database db8 vgroups 8")
# self.create_tables("db8", "stb8", 30*10000)
# tdSql.execute("create database db12 vgroups 12")
# self.create_tables("db12", "stb12", 30*10000)
# tdSql.execute("create database db16 vgroups 16")
# self.create_tables("db16", "stb16", 30*10000)
return return
# test case2 base:insert data # test case2 base:insert data
def test_case2(self): def test_case2(self):
tdLog.debug("-----insert data test------- ") tdLog.debug("-----muti-thread insert data test------- ")
# drop database # drop database
tdSql.execute("drop database if exists db1") tdSql.execute("drop database if exists db1")
tdSql.execute("drop database if exists db4") tdSql.execute("drop database if exists db4")
@ -321,28 +308,6 @@ class TDTestCase:
tdSql.execute("create database db1 vgroups 1") tdSql.execute("create database db1 vgroups 1")
self.create_tables("db1", "stb1", 1*100) self.create_tables("db1", "stb1", 1*100)
self.insert_data("db1", "stb1", self.ts, 1*50,1*10000) self.insert_data("db1", "stb1", self.ts, 1*50,1*10000)
tdSql.execute("create database db4 vgroups 4")
self.create_tables("db4", "stb4", 1*100)
self.insert_data("db4", "stb4", self.ts, 1*100,1*10000)
tdSql.execute("create database db6 vgroups 6")
self.create_tables("db6", "stb6", 1*100)
self.insert_data("db6", "stb6", self.ts, 1*100,1*10000)
tdSql.execute("create database db8 vgroups 8")
self.create_tables("db8", "stb8", 1*100)
self.insert_data("db8", "stb8", self.ts, 1*100,1*10000)
tdSql.execute("create database db12 vgroups 12")
self.create_tables("db12", "stb12", 1*100)
self.insert_data("db12", "stb12", self.ts, 1*100,1*10000)
tdSql.execute("create database db16 vgroups 16")
self.create_tables("db16", "stb16", 1*100)
self.insert_data("db16", "stb16", self.ts, 1*100,1*10000)
return return
def test_case3(self): def test_case3(self):
@ -356,6 +321,70 @@ class TDTestCase:
return return
def test_case4(self):
self.taosBenchCreate("127.0.0.1","no","db1", "stb1", 1, 2, 1*10)
tdSql.execute("use db1;")
tdSql.query("show dnodes;")
dnodeId=tdSql.getData(0,0)
print(dnodeId)
tdSql.execute("create qnode on dnode %s"%dnodeId)
tdSql.query("select max(c1) from stb10;")
maxQnode=tdSql.getData(0,0)
tdSql.query("select min(c1) from stb11;")
minQnode=tdSql.getData(0,0)
tdSql.query("select c0,c1 from stb11_1 where (c0>1000) union select c0,c1 from stb11_1 where c0>2000;")
unionQnode=tdSql.queryResult
tdSql.query("select c0,c1 from stb11_1 where (c0>1000) union all select c0,c1 from stb11_1 where c0>2000;")
unionallQnode=tdSql.queryResult
# tdSql.query("show qnodes;")
# qnodeId=tdSql.getData(0,0)
tdSql.execute("drop qnode on dnode %s"%dnodeId)
tdSql.execute("reset query cache")
tdSql.query("select max(c1) from stb10;")
tdSql.checkData(0, 0, "%s"%maxQnode)
tdSql.query("select min(c1) from stb11;")
tdSql.checkData(0, 0, "%s"%minQnode)
tdSql.query("select c0,c1 from stb11_1 where (c0>1000) union select c0,c1 from stb11_1 where c0>2000;")
unionVnode=tdSql.queryResult
assert unionQnode == unionVnode
tdSql.query("select c0,c1 from stb11_1 where (c0>1000) union all select c0,c1 from stb11_1 where c0>2000;")
unionallVnode=tdSql.queryResult
assert unionallQnode == unionallVnode
# tdSql.execute("create qnode on dnode %s"%dnodeId)
# self.taosBenchCreate("test209","no","db2", "stb2", 1, 8, 1*10000)
# self.taosBenchCreate("chenhaoran02","no","db1", "stb1", 1, 8, 1*10000)
# self.taosBenchCreate("db1", "stb1", 4, 5, 100*10000)
# self.taosBenchCreate("db1", "stb1", 1, 5, 100*10000)
# run case
def run(self):
# # test base case
# self.test_case1()
# tdLog.debug(" LIMIT test_case1 ............ [OK]")
# test case
# self.test_case2()
# tdLog.debug(" LIMIT test_case2 ............ [OK]")
# test case
self.test_case3()
tdLog.debug(" LIMIT test_case3 ............ [OK]")
# # test qnode
# self.test_case4()
# tdLog.debug(" LIMIT test_case3 ............ [OK]")
return
# #
# add case with filename # add case with filename
# #

View File

@ -11,7 +11,7 @@
"confirm_parameter_prompt": "no", "confirm_parameter_prompt": "no",
"insert_interval": 0, "insert_interval": 0,
"interlace_rows": 100000, "interlace_rows": 100000,
"num_of_records_per_req": 100000, "num_of_records_per_req": 100,
"databases": [ "databases": [
{ {
"dbinfo": { "dbinfo": {