Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
dd7e41e4
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看板
提交
dd7e41e4
编写于
11月 27, 2021
作者:
J
jiajingbin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-10952]<test>: Finish testcases for opentstb-telnet-protocol with taosadapter
上级
c96ea21c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
22 addition
and
17 deletion
+22
-17
tests/pytest/insert/openTsdbTelnetTaosadapterInsert.py
tests/pytest/insert/openTsdbTelnetTaosadapterInsert.py
+22
-17
未找到文件。
tests/pytest/insert/openTsdbTelnet
Blm3
Insert.py
→
tests/pytest/insert/openTsdbTelnet
Taosadapter
Insert.py
浏览文件 @
dd7e41e4
...
@@ -153,17 +153,23 @@ class TDTestCase:
...
@@ -153,17 +153,23 @@ class TDTestCase:
if
"id="
in
elm
.
lower
():
if
"id="
in
elm
.
lower
():
tb_name
=
elm
.
split
(
'='
)[
1
]
tb_name
=
elm
.
split
(
'='
)[
1
]
else
:
else
:
tag_name_list
.
append
(
elm
.
split
(
"="
)[
0
]
.
lower
()
)
tag_name_list
.
append
(
elm
.
split
(
"="
)[
0
])
tag_value_list
.
append
(
elm
.
split
(
"="
)[
1
])
tag_value_list
.
append
(
elm
.
split
(
"="
)[
1
])
tb_name
=
""
tb_name
=
""
td_tag_value_list
.
append
(
self
.
getTdTypeValue
(
elm
.
split
(
"="
)[
1
],
"tag"
)[
1
])
td_tag_value_list
.
append
(
self
.
getTdTypeValue
(
elm
.
split
(
"="
)[
1
],
"tag"
)[
1
])
td_tag_type_list
.
append
(
self
.
getTdTypeValue
(
elm
.
split
(
"="
)[
1
],
"tag"
)[
0
])
td_tag_type_list
.
append
(
self
.
getTdTypeValue
(
elm
.
split
(
"="
)[
1
],
"tag"
)[
0
])
else
:
else
:
tag_name_list
.
append
(
elm
.
split
(
"="
)[
0
].
lower
())
if
"id"
==
elm
.
split
(
"="
)[
0
].
lower
():
tag_value_list
.
append
(
elm
.
split
(
"="
)[
1
])
tag_name_list
.
insert
(
0
,
elm
.
split
(
"="
)[
0
])
tb_name
=
""
tag_value_list
.
insert
(
0
,
elm
.
split
(
"="
)[
1
])
td_tag_value_list
.
append
(
self
.
getTdTypeValue
(
elm
.
split
(
"="
)[
1
],
"tag"
)[
1
])
td_tag_value_list
.
insert
(
0
,
self
.
getTdTypeValue
(
elm
.
split
(
"="
)[
1
],
"tag"
)[
1
])
td_tag_type_list
.
append
(
self
.
getTdTypeValue
(
elm
.
split
(
"="
)[
1
],
"tag"
)[
0
])
td_tag_type_list
.
insert
(
0
,
self
.
getTdTypeValue
(
elm
.
split
(
"="
)[
1
],
"tag"
)[
0
])
else
:
tag_name_list
.
append
(
elm
.
split
(
"="
)[
0
])
tag_value_list
.
append
(
elm
.
split
(
"="
)[
1
])
tb_name
=
""
td_tag_value_list
.
append
(
self
.
getTdTypeValue
(
elm
.
split
(
"="
)[
1
],
"tag"
)[
1
])
td_tag_type_list
.
append
(
self
.
getTdTypeValue
(
elm
.
split
(
"="
)[
1
],
"tag"
)[
0
])
col_name_list
.
append
(
'value'
)
col_name_list
.
append
(
'value'
)
col_value_list
.
append
(
stb_col_value
)
col_value_list
.
append
(
stb_col_value
)
...
@@ -523,8 +529,9 @@ class TDTestCase:
...
@@ -523,8 +529,9 @@ class TDTestCase:
tdSql
.
checkEqual
(
res
.
status_code
,
500
)
tdSql
.
checkEqual
(
res
.
status_code
,
500
)
tdSql
.
checkIn
(
"Table name too long"
,
res
.
text
)
tdSql
.
checkIn
(
"Table name too long"
,
res
.
text
)
input_sql
=
'Abcdffgg 1626006833640 False T1=127i8'
input_sql
=
'Abcdffgg 1626006833640 False T1=127i8'
stb_name
=
input_sql
.
split
(
" "
)[
0
]
stb_name
=
f
'`
{
input_sql
.
split
(
" "
)[
0
]
}
`'
self
.
resCmp
(
input_sql
,
stb_name
)
self
.
resCmp
(
input_sql
,
stb_name
)
tdCom
.
restApiPost
(
'drop table `Abcdffgg`'
)
def
tagNameLengthCheckCase
(
self
):
def
tagNameLengthCheckCase
(
self
):
"""
"""
...
@@ -1027,7 +1034,7 @@ st123456 1626006833648 9i64 t1=4i64 t3=\"t4\" t2=5f64 t4=5f64'
...
@@ -1027,7 +1034,7 @@ st123456 1626006833648 9i64 t1=4i64 t3=\"t4\" t2=5f64 t4=5f64'
if
self
.
smlChildTableName_value
==
"ID"
:
if
self
.
smlChildTableName_value
==
"ID"
:
input_sql
=
'rFa$sta 1626006834 9223372036854775807 id=rFas$ta_1 Tt!0=true tT@1=127Ii8 t#2=32767i16 "t$3"=2147483647i32 t%4=9223372036854775807i64 t^5=11.12345f32 t&6=22.123456789f64 t*7=
\"
ddzhiksj
\"
t!@#$%^&*()_+[];:<>?,9=L
\"
ncharTagValue
\"
'
input_sql
=
'rFa$sta 1626006834 9223372036854775807 id=rFas$ta_1 Tt!0=true tT@1=127Ii8 t#2=32767i16 "t$3"=2147483647i32 t%4=9223372036854775807i64 t^5=11.12345f32 t&6=22.123456789f64 t*7=
\"
ddzhiksj
\"
t!@#$%^&*()_+[];:<>?,9=L
\"
ncharTagValue
\"
'
tdCom
.
schemalessApiPost
(
sql
=
input_sql
,
url_type
=
"telnet"
)
tdCom
.
schemalessApiPost
(
sql
=
input_sql
,
url_type
=
"telnet"
)
query_sql
=
'select * from `r
f
a$sta`'
query_sql
=
'select * from `r
F
a$sta`'
query_res
=
tdSql
.
query
(
query_sql
,
True
)
query_res
=
tdSql
.
query
(
query_sql
,
True
)
tdSql
.
checkEqual
(
query_res
,
[(
datetime
.
datetime
(
2021
,
7
,
11
,
20
,
33
,
54
),
9.223372036854776e+18
,
'true'
,
'127Ii8'
,
'32767i16'
,
'2147483647i32'
,
'9223372036854775807i64'
,
'11.12345f32'
,
'22.123456789f64'
,
'"ddzhiksj"'
,
'L"ncharTagValue"'
)])
tdSql
.
checkEqual
(
query_res
,
[(
datetime
.
datetime
(
2021
,
7
,
11
,
20
,
33
,
54
),
9.223372036854776e+18
,
'true'
,
'127Ii8'
,
'32767i16'
,
'2147483647i32'
,
'9223372036854775807i64'
,
'11.12345f32'
,
'22.123456789f64'
,
'"ddzhiksj"'
,
'L"ncharTagValue"'
)])
col_tag_res
=
tdSql
.
getColNameList
(
query_sql
)
col_tag_res
=
tdSql
.
getColNameList
(
query_sql
)
...
@@ -1035,12 +1042,12 @@ st123456 1626006833648 9i64 t1=4i64 t3=\"t4\" t2=5f64 t4=5f64'
...
@@ -1035,12 +1042,12 @@ st123456 1626006833648 9i64 t1=4i64 t3=\"t4\" t2=5f64 t4=5f64'
else
:
else
:
input_sql
=
'rFa$sta 1626006834 9223372036854775807 Tt!0=true tT@1=127Ii8 t#2=32767i16 "t$3"=2147483647i32 t%4=9223372036854775807i64 t^5=11.12345f32 t&6=22.123456789f64 t*7=
\"
ddzhiksj
\"
t!@#$%^&*()_+[];:<>?,9=L
\"
ncharTagValue
\"
'
input_sql
=
'rFa$sta 1626006834 9223372036854775807 Tt!0=true tT@1=127Ii8 t#2=32767i16 "t$3"=2147483647i32 t%4=9223372036854775807i64 t^5=11.12345f32 t&6=22.123456789f64 t*7=
\"
ddzhiksj
\"
t!@#$%^&*()_+[];:<>?,9=L
\"
ncharTagValue
\"
'
tdCom
.
schemalessApiPost
(
sql
=
input_sql
,
url_type
=
"telnet"
)
tdCom
.
schemalessApiPost
(
sql
=
input_sql
,
url_type
=
"telnet"
)
query_sql
=
'select * from `r
f
a$sta`'
query_sql
=
'select * from `r
F
a$sta`'
query_res
=
tdSql
.
query
(
query_sql
,
True
)
query_res
=
tdSql
.
query
(
query_sql
,
True
)
tdSql
.
checkEqual
(
query_res
,
[(
datetime
.
datetime
(
2021
,
7
,
11
,
20
,
33
,
54
),
9.223372036854776e+18
,
'
true'
,
'127Ii8'
,
'32767i16'
,
'2147483647i32'
,
'9223372036854775807i64'
,
'11.12345f32'
,
'22.123456789f64'
,
'"ddzhiksj"'
,
'L"ncharTagValue"
'
)])
tdSql
.
checkEqual
(
query_res
,
[(
datetime
.
datetime
(
2021
,
7
,
11
,
20
,
33
,
54
),
9.223372036854776e+18
,
'
2147483647i32'
,
'L"ncharTagValue"'
,
'32767i16'
,
'9223372036854775807i64'
,
'22.123456789f64'
,
'"ddzhiksj"'
,
'11.12345f32'
,
'true'
,
'127Ii8
'
)])
col_tag_res
=
tdSql
.
getColNameList
(
query_sql
)
col_tag_res
=
tdSql
.
getColNameList
(
query_sql
)
tdSql
.
checkEqual
(
col_tag_res
,
[
'ts'
,
'value'
,
'
tt!0'
,
'tt@1'
,
't#2'
,
'"t$3"'
,
't%4'
,
't^5'
,
't&6'
,
't*7'
,
't!@#$%^&*()_+[];:<>?,9
'
])
tdSql
.
checkEqual
(
col_tag_res
,
[
'ts'
,
'value'
,
'
"t$3"'
,
't!@#$%^&*()_+[];:<>?,9'
,
't#2'
,
't%4'
,
't&6'
,
't*7'
,
't^5'
,
'Tt!0'
,
'tT@1
'
])
tdCom
.
restApiPost
(
'drop table `r
f
a$sta`'
)
tdCom
.
restApiPost
(
'drop table `r
F
a$sta`'
)
def
genSqlList
(
self
,
count
=
5
,
stb_name
=
""
,
tb_name
=
""
):
def
genSqlList
(
self
,
count
=
5
,
stb_name
=
""
,
tb_name
=
""
):
"""
"""
...
@@ -1317,8 +1324,7 @@ st123456 1626006833648 9i64 t1=4i64 t3=\"t4\" t2=5f64 t4=5f64'
...
@@ -1317,8 +1324,7 @@ st123456 1626006833648 9i64 t1=4i64 t3=\"t4\" t2=5f64 t4=5f64'
self
.
symbolsCheckCase
()
self
.
symbolsCheckCase
()
self
.
tsCheckCase
()
self
.
tsCheckCase
()
self
.
openTstbTelnetTsCheckCase
()
self
.
openTstbTelnetTsCheckCase
()
#! bug
self
.
idSeqCheckCase
()
# self.idSeqCheckCase()
self
.
idLetterCheckCase
()
self
.
idLetterCheckCase
()
self
.
noIdCheckCase
()
self
.
noIdCheckCase
()
self
.
maxColTagCheckCase
()
self
.
maxColTagCheckCase
()
...
@@ -1352,8 +1358,7 @@ st123456 1626006833648 9i64 t1=4i64 t3=\"t4\" t2=5f64 t4=5f64'
...
@@ -1352,8 +1358,7 @@ st123456 1626006833648 9i64 t1=4i64 t3=\"t4\" t2=5f64 t4=5f64'
self
.
spellCheckCase
()
self
.
spellCheckCase
()
self
.
pointTransCheckCase
()
self
.
pointTransCheckCase
()
self
.
defaultTypeCheckCase
()
self
.
defaultTypeCheckCase
()
#!bug
self
.
tbnameTagsColsNameCheckCase
()
# self.tbnameTagsColsNameCheckCase()
# # MultiThreads
# # MultiThreads
self
.
stbInsertMultiThreadCheckCase
()
self
.
stbInsertMultiThreadCheckCase
()
self
.
sStbStbDdataInsertMultiThreadCheckCase
()
self
.
sStbStbDdataInsertMultiThreadCheckCase
()
...
@@ -1363,7 +1368,7 @@ st123456 1626006833648 9i64 t1=4i64 t3=\"t4\" t2=5f64 t4=5f64'
...
@@ -1363,7 +1368,7 @@ st123456 1626006833648 9i64 t1=4i64 t3=\"t4\" t2=5f64 t4=5f64'
self
.
sStbDtbDdataMtInsertMultiThreadCheckCase
()
self
.
sStbDtbDdataMtInsertMultiThreadCheckCase
()
self
.
sStbDtbDdataAtInsertMultiThreadCheckCase
()
self
.
sStbDtbDdataAtInsertMultiThreadCheckCase
()
self
.
sStbStbDdataDtsInsertMultiThreadCheckCase
()
self
.
sStbStbDdataDtsInsertMultiThreadCheckCase
()
self
.
sStbStbDdataDtsMtInsertMultiThreadCheckCase
()
#
self.sStbStbDdataDtsMtInsertMultiThreadCheckCase()
self
.
sStbStbDdataDtsAtInsertMultiThreadCheckCase
()
self
.
sStbStbDdataDtsAtInsertMultiThreadCheckCase
()
self
.
sStbDtbDdataDtsInsertMultiThreadCheckCase
()
self
.
sStbDtbDdataDtsInsertMultiThreadCheckCase
()
self
.
sStbDtbDdataDtsMtInsertMultiThreadCheckCase
()
self
.
sStbDtbDdataDtsMtInsertMultiThreadCheckCase
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录