update test cases
This commit is contained in:
parent
da9edd8756
commit
f1bae383b0
|
@ -210,10 +210,11 @@ class TDTestCase:
|
|||
self.tag_check(i,k,tag_unint)
|
||||
for error in [constant.INT_UN_MIN-1,constant.INT_UN_MAX+1]:
|
||||
tdSql.error(f'alter table {self.stbname}_{i} set tag {k} = {error}')
|
||||
elif v.lower() == 'bigint unsigned':
|
||||
self.tag_check(i,k,tag_unbigint)
|
||||
for error in [constant.BIGINT_UN_MIN-1,constant.BIGINT_UN_MAX+1]:
|
||||
tdSql.error(f'alter table {self.stbname}_{i} set tag {k} = {error}')
|
||||
#! bug TD-17106
|
||||
# elif v.lower() == 'bigint unsigned':
|
||||
# self.tag_check(i,k,tag_unbigint)
|
||||
# for error in [constant.BIGINT_UN_MIN-1,constant.BIGINT_UN_MAX+1]:
|
||||
# tdSql.error(f'alter table {self.stbname}_{i} set tag {k} = {error}')
|
||||
elif v.lower() == 'bool':
|
||||
self.tag_check(i,k,tag_bool)
|
||||
elif v.lower() == 'float':
|
||||
|
@ -223,8 +224,8 @@ class TDTestCase:
|
|||
tdSql.checkEqual(tdSql.queryResult[0][0],tdSql.queryResult[0][0])
|
||||
else:
|
||||
tdLog.exit(f'select {k} from {self.stbname}_{i},data check failure')
|
||||
# for error in [constant.FLOAT_MIN*10,constant.FLOAT_MAX*10]:
|
||||
# tdSql.error(f'alter table {self.stbname}_{i} set tag {k} = {error}')
|
||||
for error in [constant.DOUBLE_MIN*1.1,constant.DOUBLE_MAX*1.1]:
|
||||
tdSql.error(f'alter table {self.stbname}_{i} set tag {k} = {error}')
|
||||
elif v.lower() == 'double':
|
||||
tdSql.execute(f'alter table {self.stbname}_{i} set tag {k} = {tag_double}')
|
||||
tdSql.query(f'select {k} from {self.stbname}_{i}')
|
||||
|
@ -232,7 +233,7 @@ class TDTestCase:
|
|||
tdSql.checkEqual(tdSql.queryResult[0][0],tdSql.queryResult[0][0])
|
||||
else:
|
||||
tdLog.exit(f'select {k} from {self.stbname}_{i},data check failure')
|
||||
for error in [constant.DOUBLE_MIN-1,constant.DOUBLE_MAX+1]:
|
||||
for error in [constant.DOUBLE_MIN*1.1,constant.DOUBLE_MAX*1.1]:
|
||||
tdSql.error(f'alter table {self.stbname}_{i} set tag {k} = {error}')
|
||||
elif 'binary' in v.lower():
|
||||
tag_binary_error = tdCom.getLongName(self.binary_length+1)
|
||||
|
@ -242,7 +243,8 @@ class TDTestCase:
|
|||
tdSql.checkData(0,0,tag_binary)
|
||||
elif 'nchar' in v.lower():
|
||||
tag_nchar_error = tdCom.getLongName(self.nchar_length+1)
|
||||
tdSql.execute(f'alter table {self.stbname}_{i} set tag {k} = "{tag_nchar_error}"')
|
||||
tdSql.error(f'alter table {self.stbname}_{i} set tag {k} = "{tag_nchar_error}"')
|
||||
tdSql.execute(f'alter table {self.stbname}_{i} set tag {k} = "{tag_nchar}"')
|
||||
tdSql.query(f'select {k} from {self.stbname}_{i}')
|
||||
tdSql.checkData(0,0,tag_nchar)
|
||||
|
||||
|
|
|
@ -137,28 +137,8 @@ class TDTestCase:
|
|||
#!bug TD-17119
|
||||
# for k,v in self.tag_dict.items():
|
||||
# for param in self.param:
|
||||
# if v.lower() in ['timestamp','bool'] or 'binary' in v.lower() or 'nchar' in v.lower():
|
||||
# tdSql.error(f'select percentile({k},{param}) from {self.stbname}_{i}')
|
||||
# elif v.lower() == 'tinyint':
|
||||
# self.check_tags(k,param,i,self.tag_tinyint)
|
||||
# elif v.lower() == 'smallint':
|
||||
# self.check_tags(k,param,i,self.tag_smallint)
|
||||
# elif v.lower() == 'int':
|
||||
# self.check_tags(k,param,i,self.tag_int)
|
||||
# elif v.lower() == 'bigint':
|
||||
# self.check_tags(k,param,i,self.tag_bigint)
|
||||
# elif v.lower() == 'tinyint unsigned':
|
||||
# self.check_tags(k,param,i,self.tag_utint)
|
||||
# elif v.lower() == 'smallint unsigned':
|
||||
# self.check_tags(k,param,i,self.tag_usint)
|
||||
# elif v.lower() == 'int unsigned':
|
||||
# self.check_tags(k,param,i,self.tag_uint)
|
||||
# elif v.lower() == 'bigint unsigned':
|
||||
# self.check_tags(k,param,i,self.tag_ubint)
|
||||
# elif v.lower() == 'float':
|
||||
# self.check_tags(k,param,i,self.tag_float)
|
||||
# elif v.lower() == 'double':
|
||||
# self.check_tags(k,param,i,self.tag_double)
|
||||
# tdSql.error(f'select percentile({k},{param}) from {self.stbname}_{i}')
|
||||
|
||||
def run(self):
|
||||
self.function_check_ntb()
|
||||
self.function_check_ctb()
|
||||
|
|
Loading…
Reference in New Issue