chore: adjust test case
This commit is contained in:
parent
277116f811
commit
69448e4801
|
@ -65,7 +65,7 @@ class TDTestCase:
|
|||
|
||||
tdSql.query('select count(*),db_name, stable_name from information_schema.ins_tables group by db_name, stable_name;')
|
||||
tdSql.checkRows(3)
|
||||
tdSql.checkData(0, 0, 26)
|
||||
tdSql.checkData(0, 0, 29)
|
||||
tdSql.checkData(0, 1, 'information_schema')
|
||||
tdSql.checkData(0, 2, None)
|
||||
tdSql.checkData(1, 0, 3)
|
||||
|
@ -77,7 +77,7 @@ class TDTestCase:
|
|||
|
||||
tdSql.query('select count(1) v,db_name, stable_name from information_schema.ins_tables group by db_name, stable_name order by v desc;')
|
||||
tdSql.checkRows(3)
|
||||
tdSql.checkData(0, 0, 26)
|
||||
tdSql.checkData(0, 0, 29)
|
||||
tdSql.checkData(0, 1, 'information_schema')
|
||||
tdSql.checkData(0, 2, None)
|
||||
tdSql.checkData(1, 0, 5)
|
||||
|
@ -93,7 +93,7 @@ class TDTestCase:
|
|||
tdSql.checkData(1, 1, 'performance_schema')
|
||||
tdSql.checkData(0, 0, 3)
|
||||
tdSql.checkData(0, 1, 'tbl_count')
|
||||
tdSql.checkData(2, 0, 26)
|
||||
tdSql.checkData(2, 0, 29)
|
||||
tdSql.checkData(2, 1, 'information_schema')
|
||||
|
||||
tdSql.query("select count(*) from information_schema.ins_tables where db_name='tbl_count'")
|
||||
|
@ -106,7 +106,7 @@ class TDTestCase:
|
|||
|
||||
tdSql.query('select count(*) from information_schema.ins_tables')
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 34)
|
||||
tdSql.checkData(0, 0, 37)
|
||||
|
||||
|
||||
tdSql.execute('create table stba (ts timestamp, c1 bool, c2 tinyint, c3 smallint, c4 int, c5 bigint, c6 float, c7 double, c8 binary(10), c9 nchar(10), c10 tinyint unsigned, c11 smallint unsigned, c12 int unsigned, c13 bigint unsigned) TAGS(t1 int, t2 binary(10), t3 double);')
|
||||
|
@ -189,7 +189,7 @@ class TDTestCase:
|
|||
tdSql.checkData(2, 0, 5)
|
||||
tdSql.checkData(2, 1, 'performance_schema')
|
||||
tdSql.checkData(2, 2, None)
|
||||
tdSql.checkData(3, 0, 26)
|
||||
tdSql.checkData(3, 0, 29)
|
||||
tdSql.checkData(3, 1, 'information_schema')
|
||||
tdSql.checkData(3, 2, None)
|
||||
|
||||
|
@ -204,7 +204,7 @@ class TDTestCase:
|
|||
tdSql.checkData(2, 0, 5)
|
||||
tdSql.checkData(2, 1, 'performance_schema')
|
||||
tdSql.checkData(2, 2, None)
|
||||
tdSql.checkData(3, 0, 26)
|
||||
tdSql.checkData(3, 0, 29)
|
||||
tdSql.checkData(3, 1, 'information_schema')
|
||||
tdSql.checkData(3, 2, None)
|
||||
|
||||
|
@ -215,7 +215,7 @@ class TDTestCase:
|
|||
tdSql.checkData(0, 1, 'tbl_count')
|
||||
tdSql.checkData(1, 0, 5)
|
||||
tdSql.checkData(1, 1, 'performance_schema')
|
||||
tdSql.checkData(2, 0, 26)
|
||||
tdSql.checkData(2, 0, 29)
|
||||
tdSql.checkData(2, 1, 'information_schema')
|
||||
|
||||
tdSql.query("select count(*) from information_schema.ins_tables where db_name='tbl_count'")
|
||||
|
@ -228,7 +228,7 @@ class TDTestCase:
|
|||
|
||||
tdSql.query('select count(*) from information_schema.ins_tables')
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 35)
|
||||
tdSql.checkData(0, 0, 38)
|
||||
|
||||
|
||||
tdSql.execute('drop database tbl_count')
|
||||
|
|
|
@ -58,7 +58,7 @@ endi
|
|||
|
||||
sql select tbname from information_schema.ins_tables;
|
||||
print $rows $data00
|
||||
if $rows != 35 then
|
||||
if $rows != 38 then
|
||||
return -1
|
||||
endi
|
||||
if $data00 != @ins_tables@ then
|
||||
|
|
|
@ -53,7 +53,7 @@ sql select stable_name,count(table_name) from information_schema.ins_tables grou
|
|||
if $rows != 3 then
|
||||
return -1
|
||||
endi
|
||||
if $data01 != 32 then
|
||||
if $data01 != 35 then
|
||||
return -1
|
||||
endi
|
||||
if $data11 != 10 then
|
||||
|
@ -72,7 +72,7 @@ endi
|
|||
if $data11 != 5 then
|
||||
return -1
|
||||
endi
|
||||
if $data21 != 26 then
|
||||
if $data21 != 29 then
|
||||
return -1
|
||||
endi
|
||||
if $data31 != 5 then
|
||||
|
@ -97,7 +97,7 @@ endi
|
|||
if $data42 != 3 then
|
||||
return -1
|
||||
endi
|
||||
if $data52 != 26 then
|
||||
if $data52 != 29 then
|
||||
return -1
|
||||
endi
|
||||
if $data62 != 5 then
|
||||
|
|
|
@ -58,7 +58,7 @@ class TDTestCase:
|
|||
self.ins_list = ['ins_dnodes','ins_mnodes','ins_qnodes','ins_snodes','ins_cluster','ins_databases','ins_functions',\
|
||||
'ins_indexes','ins_stables','ins_tables','ins_tags','ins_columns','ins_users','ins_grants','ins_vgroups','ins_configs','ins_dnode_variables',\
|
||||
'ins_topics','ins_subscriptions','ins_streams','ins_stream_tasks','ins_vnodes','ins_user_privileges','ins_views',
|
||||
'ins_compacts', 'ins_compact_details']
|
||||
'ins_compacts', 'ins_compact_details', 'ins_grants_full','ins_grants_logs', 'ins_machines']
|
||||
self.perf_list = ['perf_connections','perf_queries','perf_consumers','perf_trans','perf_apps']
|
||||
def insert_data(self,column_dict,tbname,row_num):
|
||||
insert_sql = self.setsql.set_insertsql(column_dict,tbname,self.binary_str,self.nchar_str)
|
||||
|
@ -218,7 +218,7 @@ class TDTestCase:
|
|||
tdSql.checkEqual(20470,len(tdSql.queryResult))
|
||||
|
||||
tdSql.query("select * from information_schema.ins_columns where db_name ='information_schema'")
|
||||
tdSql.checkEqual(219, len(tdSql.queryResult))
|
||||
tdSql.checkEqual(True, len(tdSql.queryResult) in range(215, 230))
|
||||
|
||||
tdSql.query("select * from information_schema.ins_columns where db_name ='performance_schema'")
|
||||
tdSql.checkEqual(54, len(tdSql.queryResult))
|
||||
|
@ -229,8 +229,7 @@ class TDTestCase:
|
|||
tdSql.query(f'select * from information_schema.ins_dnodes')
|
||||
result = tdSql.queryResult
|
||||
tdSql.checkEqual(result[0][0],1)
|
||||
tdSql.checkEqual(result[0][8],"")
|
||||
tdSql.checkEqual(result[0][9],"")
|
||||
tdSql.checkEqual(True, len(result[0][8]) in (0,24))
|
||||
self.str107 = 'Hc7VCc+'
|
||||
for t in range (10):
|
||||
self.str107 += 'tP+2soIXpP'
|
||||
|
@ -247,11 +246,9 @@ class TDTestCase:
|
|||
tdSql.error('alter dnode 1 "activeCode" "' + self.str109 + '"')
|
||||
tdSql.error('alter all dnodes "activeCode" "' + self.str510 + '"')
|
||||
tdSql.query(f'select * from information_schema.ins_dnodes')
|
||||
tdSql.checkEqual(tdSql.queryResult[0][8],"")
|
||||
tdSql.execute('alter dnode 1 "activeCode" ""')
|
||||
tdSql.query(f'select active_code,c_active_code from information_schema.ins_dnodes')
|
||||
tdSql.checkEqual(tdSql.queryResult[0][0],"")
|
||||
tdSql.checkEqual(tdSql.queryResult[0][1],'')
|
||||
tdSql.checkEqual(True, len(result[0][8]) in (0,24))
|
||||
tdSql.error('alter dnode 1 "activeCode" ""')
|
||||
tdSql.error(f'select active_code,c_active_code from information_schema.ins_dnodes')
|
||||
tdSql.error('alter dnode 1 "cActiveCode" "a"')
|
||||
tdSql.error('alter dnode 1 "cActiveCode" "' + self.str107 + '"')
|
||||
tdSql.error('alter dnode 1 "cActiveCode" "' + self.str256 + '"')
|
||||
|
@ -260,15 +257,11 @@ class TDTestCase:
|
|||
tdSql.error('alter all dnodes "cActiveCode" "' + self.str257 + '"')
|
||||
tdSql.error('alter all dnodes "cActiveCode" "' + self.str254 + '"')
|
||||
tdSql.error('alter dnode 1 "cActiveCode" "' + self.str510 + '"')
|
||||
tdSql.query(f'select active_code,c_active_code from information_schema.ins_dnodes')
|
||||
tdSql.checkEqual(tdSql.queryResult[0][0],"")
|
||||
tdSql.checkEqual(tdSql.queryResult[0][1],"")
|
||||
tdSql.error(f'select active_code,c_active_code from information_schema.ins_dnodes')
|
||||
tdSql.error('alter dnode 1 "cActiveCode" "' + self.str109 + '"')
|
||||
tdSql.query(f'show dnodes')
|
||||
tdSql.checkEqual(tdSql.queryResult[0][9],"")
|
||||
tdSql.execute('alter all dnodes "cActiveCode" ""')
|
||||
tdSql.query(f'select c_active_code from information_schema.ins_dnodes')
|
||||
tdSql.checkEqual(tdSql.queryResult[0][0],'')
|
||||
tdSql.error(f'select c_active_code from information_schema.ins_dnodes')
|
||||
tdSql.error('alter all dnodes "cActiveCode" ""')
|
||||
|
||||
def run(self):
|
||||
self.prepare_data()
|
||||
|
|
Loading…
Reference in New Issue