Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f1bae383
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f1bae383
编写于
7月 12, 2022
作者:
J
jiacy-jcy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update test cases
上级
da9edd87
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
30 deletion
+12
-30
tests/system-test/1-insert/alter_table.py
tests/system-test/1-insert/alter_table.py
+10
-8
tests/system-test/2-query/percentile.py
tests/system-test/2-query/percentile.py
+2
-22
未找到文件。
tests/system-test/1-insert/alter_table.py
浏览文件 @
f1bae383
...
@@ -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,8 +224,8 @@ class TDTestCase:
...
@@ -223,8 +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
]:
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
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
}
'
)
tdSql
.
query
(
f
'select
{
k
}
from
{
self
.
stbname
}
_
{
i
}
'
)
tdSql
.
query
(
f
'select
{
k
}
from
{
self
.
stbname
}
_
{
i
}
'
)
...
@@ -232,7 +233,7 @@ class TDTestCase:
...
@@ -232,7 +233,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 +243,8 @@ class TDTestCase:
...
@@ -242,7 +243,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
)
...
...
tests/system-test/2-query/percentile.py
浏览文件 @
f1bae383
...
@@ -137,28 +137,8 @@ class TDTestCase:
...
@@ -137,28 +137,8 @@ class TDTestCase:
#!bug TD-17119
#!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():
# tdSql.error(f'select percentile({k},{param}) from {self.stbname}_{i}')
# 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)
def
run
(
self
):
def
run
(
self
):
self
.
function_check_ntb
()
self
.
function_check_ntb
()
self
.
function_check_ctb
()
self
.
function_check_ctb
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录