未验证 提交 f4c49984 编写于 作者: H Hui Li 提交者: GitHub

Merge pull request #14812 from taosdata/3.0test/jcy

test:update test cases
...@@ -210,10 +210,11 @@ class TDTestCase: ...@@ -210,10 +210,11 @@ class TDTestCase:
self.tag_check(i,k,tag_unint) self.tag_check(i,k,tag_unint)
for error in [constant.INT_UN_MIN-1,constant.INT_UN_MAX+1]: 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}') tdSql.error(f'alter table {self.stbname}_{i} set tag {k} = {error}')
elif v.lower() == 'bigint unsigned': #! bug TD-17106
self.tag_check(i,k,tag_unbigint) # elif v.lower() == 'bigint unsigned':
for error in [constant.BIGINT_UN_MIN-1,constant.BIGINT_UN_MAX+1]: # self.tag_check(i,k,tag_unbigint)
tdSql.error(f'alter table {self.stbname}_{i} set tag {k} = {error}') # 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': elif v.lower() == 'bool':
self.tag_check(i,k,tag_bool) self.tag_check(i,k,tag_bool)
elif v.lower() == 'float': elif v.lower() == 'float':
...@@ -223,7 +224,8 @@ class TDTestCase: ...@@ -223,7 +224,8 @@ class TDTestCase:
tdSql.checkEqual(tdSql.queryResult[0][0],tdSql.queryResult[0][0]) tdSql.checkEqual(tdSql.queryResult[0][0],tdSql.queryResult[0][0])
else: else:
tdLog.exit(f'select {k} from {self.stbname}_{i},data check failure') tdLog.exit(f'select {k} from {self.stbname}_{i},data check failure')
# for error in [constant.FLOAT_MIN*10,constant.FLOAT_MAX*10]: #! bug TD-17106
# for error in [constant.FLOAT_MIN*1.1,constant.FLOAT_MAX*1.1]:
# tdSql.error(f'alter table {self.stbname}_{i} set tag {k} = {error}') # tdSql.error(f'alter table {self.stbname}_{i} set tag {k} = {error}')
elif v.lower() == 'double': elif v.lower() == 'double':
tdSql.execute(f'alter table {self.stbname}_{i} set tag {k} = {tag_double}') tdSql.execute(f'alter table {self.stbname}_{i} set tag {k} = {tag_double}')
...@@ -232,7 +234,7 @@ class TDTestCase: ...@@ -232,7 +234,7 @@ class TDTestCase:
tdSql.checkEqual(tdSql.queryResult[0][0],tdSql.queryResult[0][0]) tdSql.checkEqual(tdSql.queryResult[0][0],tdSql.queryResult[0][0])
else: else:
tdLog.exit(f'select {k} from {self.stbname}_{i},data check failure') 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}') tdSql.error(f'alter table {self.stbname}_{i} set tag {k} = {error}')
elif 'binary' in v.lower(): elif 'binary' in v.lower():
tag_binary_error = tdCom.getLongName(self.binary_length+1) tag_binary_error = tdCom.getLongName(self.binary_length+1)
...@@ -242,7 +244,8 @@ class TDTestCase: ...@@ -242,7 +244,8 @@ class TDTestCase:
tdSql.checkData(0,0,tag_binary) tdSql.checkData(0,0,tag_binary)
elif 'nchar' in v.lower(): elif 'nchar' in v.lower():
tag_nchar_error = tdCom.getLongName(self.nchar_length+1) 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.query(f'select {k} from {self.stbname}_{i}')
tdSql.checkData(0,0,tag_nchar) tdSql.checkData(0,0,tag_nchar)
......
...@@ -134,31 +134,16 @@ class TDTestCase: ...@@ -134,31 +134,16 @@ class TDTestCase:
tdSql.query(f'select percentile({k}, {param}) from {self.stbname}_{i}') tdSql.query(f'select percentile({k}, {param}) from {self.stbname}_{i}')
tdSql.checkData(0, 0, np.percentile(floatData, param)) tdSql.checkData(0, 0, np.percentile(floatData, param))
#!bug TD-17119 for k,v in self.tag_dict.items():
# for k,v in self.tag_dict.items(): for param in self.param:
# for param in self.param: if v.lower() in ['timestamp','bool'] or 'binary' in v.lower() or 'nchar' in v.lower():
# 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}')
# tdSql.error(f'select percentile({k},{param}) from {self.stbname}_{i}') else:
# elif v.lower() == 'tinyint': tdSql.query(f'select {k} from {self.stbname}_{i}')
# self.check_tags(k,param,i,self.tag_tinyint) data_num = tdSql.queryResult[0][0]
# elif v.lower() == 'smallint': tdSql.query(f'select percentile({k},{param}) from {self.stbname}_{i}')
# self.check_tags(k,param,i,self.tag_smallint) tdSql.checkData(0,0,data_num)
# 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)
def run(self): def run(self):
self.function_check_ntb() self.function_check_ntb()
self.function_check_ctb() self.function_check_ctb()
......
...@@ -21,7 +21,7 @@ python3 ./test.py -f 1-insert/opentsdb_json_taosc_insert.py ...@@ -21,7 +21,7 @@ python3 ./test.py -f 1-insert/opentsdb_json_taosc_insert.py
python3 ./test.py -f 1-insert/test_stmt_muti_insert_query.py python3 ./test.py -f 1-insert/test_stmt_muti_insert_query.py
python3 ./test.py -f 1-insert/test_stmt_set_tbname_tag.py python3 ./test.py -f 1-insert/test_stmt_set_tbname_tag.py
python3 ./test.py -f 1-insert/alter_stable.py python3 ./test.py -f 1-insert/alter_stable.py
#python3 ./test.py -f 1-insert/alter_table.py python3 ./test.py -f 1-insert/alter_table.py
python3 ./test.py -f 1-insert/insertWithMoreVgroup.py python3 ./test.py -f 1-insert/insertWithMoreVgroup.py
python3 ./test.py -f 1-insert/table_comment.py python3 ./test.py -f 1-insert/table_comment.py
python3 ./test.py -f 1-insert/time_range_wise.py python3 ./test.py -f 1-insert/time_range_wise.py
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册