Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
9c383502
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
9c383502
编写于
10月 30, 2021
作者:
haoranc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-10789]<test>:modify testcase of taosdemo that remark useless funtion
上级
7bcc880f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
62 addition
and
61 deletion
+62
-61
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py
...st/tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py
+62
-61
未找到文件。
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py
浏览文件 @
9c383502
...
...
@@ -99,10 +99,11 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
2000000
)
# spend 2min30s for 3 testcases.
# insert: drop and child_table_exists combination test
# insert: using parament "childtable_offset and childtable_limit" to control table'offset point and offset
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/sml/insert-nodbnodrop-sml.json -y"
%
binPath
)
tdSql
.
error
(
"show dbno.stables"
)
# insert: drop and child_table_exists combination test
# insert: sml can't support parament "childtable_offset and childtable_limit" \ drop=no or child_table_exists = yes
# os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-nodbnodrop-sml.json -y" % binPath)
# tdSql.error("show dbno.stables")
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/sml/insert-newdb-sml.json -y"
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count (tbname) from stb0"
)
...
...
@@ -115,30 +116,30 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
8
)
tdSql
.
query
(
"select count (tbname) from stb4"
)
tdSql
.
checkData
(
0
,
0
,
8
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/sml/insert-offset-sml.json -y"
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
50
)
tdSql
.
query
(
"select count(*) from stb1"
)
tdSql
.
checkData
(
0
,
0
,
240
)
tdSql
.
query
(
"select count(*) from stb2"
)
tdSql
.
checkData
(
0
,
0
,
220
)
tdSql
.
query
(
"select count(*) from stb3"
)
tdSql
.
checkData
(
0
,
0
,
180
)
tdSql
.
query
(
"select count(*) from stb4"
)
tdSql
.
checkData
(
0
,
0
,
160
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/sml/insert-newtable-sml.json -y"
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
150
)
tdSql
.
query
(
"select count(*) from stb1"
)
tdSql
.
checkData
(
0
,
0
,
360
)
tdSql
.
query
(
"select count(*) from stb2"
)
tdSql
.
checkData
(
0
,
0
,
360
)
tdSql
.
query
(
"select count(*) from stb3"
)
tdSql
.
checkData
(
0
,
0
,
340
)
tdSql
.
query
(
"select count(*) from stb4"
)
tdSql
.
checkData
(
0
,
0
,
400
)
#
os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-offset-sml.json -y" % binPath)
#
tdSql.execute("use db")
#
tdSql.query("select count(*) from stb0")
#
tdSql.checkData(0, 0, 50)
#
tdSql.query("select count(*) from stb1")
#
tdSql.checkData(0, 0, 240)
#
tdSql.query("select count(*) from stb2")
#
tdSql.checkData(0, 0, 220)
#
tdSql.query("select count(*) from stb3")
#
tdSql.checkData(0, 0, 180)
#
tdSql.query("select count(*) from stb4")
# tdSql.checkData(0, 0, 160)xxxxxxxxx
#
os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-newtable-sml.json -y" % binPath)
#
tdSql.execute("use db")
#
tdSql.query("select count(*) from stb0")
#
tdSql.checkData(0, 0, 150)
#
tdSql.query("select count(*) from stb1")
#
tdSql.checkData(0, 0, 360)
#
tdSql.query("select count(*) from stb2")
#
tdSql.checkData(0, 0, 360)
#
tdSql.query("select count(*) from stb3")
#
tdSql.checkData(0, 0, 340)
#
tdSql.query("select count(*) from stb4")
#
tdSql.checkData(0, 0, 400)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/sml/insert-renewdb-sml.json -y"
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count(*) from stb0"
)
...
...
@@ -265,41 +266,41 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
15000
)
# insert: auto_create
#
#
insert: auto_create
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db'
)
tdSql
.
execute
(
'use db'
)
os
.
system
(
"%staosdemo -y -f tools/taosdemoAllTest/sml/insert-drop-exist-auto-N00-sml.json "
%
binPath
)
# drop = no, child_table_exists, auto_create_table varies
tdSql
.
execute
(
'use db'
)
tdSql
.
query
(
'show tables like
\'
NN123%
\'
'
)
#child_table_exists = no, auto_create_table varies = 123
tdSql
.
checkRows
(
20
)
tdSql
.
query
(
'show tables like
\'
NNN%
\'
'
)
#child_table_exists = no, auto_create_table varies = no
tdSql
.
checkRows
(
20
)
tdSql
.
query
(
'show tables like
\'
NNY%
\'
'
)
#child_table_exists = no, auto_create_table varies = yes
tdSql
.
checkRows
(
20
)
tdSql
.
query
(
'show tables like
\'
NYN%
\'
'
)
#child_table_exists = yes, auto_create_table varies = no
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
'show tables like
\'
NY123%
\'
'
)
#child_table_exists = yes, auto_create_table varies = 123
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
'show tables like
\'
NYY%
\'
'
)
#child_table_exists = yes, auto_create_table varies = yes
tdSql
.
checkRows
(
0
)
#
tdSql.execute('drop database if exists db')
#
tdSql.execute('create database db')
#
tdSql.execute('use db')
#
os.system("%staosdemo -y -f tools/taosdemoAllTest/sml/insert-drop-exist-auto-N00-sml.json " % binPath) # drop = no, child_table_exists, auto_create_table varies
#
tdSql.execute('use db')
#
tdSql.query('show tables like \'NN123%\'') #child_table_exists = no, auto_create_table varies = 123
#
tdSql.checkRows(20)
#
tdSql.query('show tables like \'NNN%\'') #child_table_exists = no, auto_create_table varies = no
#
tdSql.checkRows(20)
#
tdSql.query('show tables like \'NNY%\'') #child_table_exists = no, auto_create_table varies = yes
#
tdSql.checkRows(20)
#
tdSql.query('show tables like \'NYN%\'') #child_table_exists = yes, auto_create_table varies = no
#
tdSql.checkRows(0)
#
tdSql.query('show tables like \'NY123%\'') #child_table_exists = yes, auto_create_table varies = 123
#
tdSql.checkRows(0)
#
tdSql.query('show tables like \'NYY%\'') #child_table_exists = yes, auto_create_table varies = yes
#
tdSql.checkRows(0)
tdSql
.
execute
(
'drop database if exists db'
)
os
.
system
(
"%staosdemo -y -f tools/taosdemoAllTest/sml/insert-drop-exist-auto-Y00-sml.json "
%
binPath
)
# drop = yes, child_table_exists, auto_create_table varies
tdSql
.
execute
(
'use db'
)
tdSql
.
query
(
'show tables like
\'
YN123%
\'
'
)
#child_table_exists = no, auto_create_table varies = 123
tdSql
.
checkRows
(
20
)
tdSql
.
query
(
'show tables like
\'
YNN%
\'
'
)
#child_table_exists = no, auto_create_table varies = no
tdSql
.
checkRows
(
20
)
tdSql
.
query
(
'show tables like
\'
YNY%
\'
'
)
#child_table_exists = no, auto_create_table varies = yes
tdSql
.
checkRows
(
20
)
tdSql
.
query
(
'show tables like
\'
YYN%
\'
'
)
#child_table_exists = yes, auto_create_table varies = no
tdSql
.
checkRows
(
20
)
tdSql
.
query
(
'show tables like
\'
YY123%
\'
'
)
#child_table_exists = yes, auto_create_table varies = 123
tdSql
.
checkRows
(
20
)
tdSql
.
query
(
'show tables like
\'
YYY%
\'
'
)
#child_table_exists = yes, auto_create_table varies = yes
tdSql
.
checkRows
(
20
)
#
tdSql.execute('drop database if exists db')
#
os.system("%staosdemo -y -f tools/taosdemoAllTest/sml/insert-drop-exist-auto-Y00-sml.json " % binPath) # drop = yes, child_table_exists, auto_create_table varies
#
tdSql.execute('use db')
#
tdSql.query('show tables like \'YN123%\'') #child_table_exists = no, auto_create_table varies = 123
#
tdSql.checkRows(20)
#
tdSql.query('show tables like \'YNN%\'') #child_table_exists = no, auto_create_table varies = no
#
tdSql.checkRows(20)
#
tdSql.query('show tables like \'YNY%\'') #child_table_exists = no, auto_create_table varies = yes
#
tdSql.checkRows(20)
#
tdSql.query('show tables like \'YYN%\'') #child_table_exists = yes, auto_create_table varies = no
#
tdSql.checkRows(20)
#
tdSql.query('show tables like \'YY123%\'') #child_table_exists = yes, auto_create_table varies = 123
#
tdSql.checkRows(20)
#
tdSql.query('show tables like \'YYY%\'') #child_table_exists = yes, auto_create_table varies = yes
#
tdSql.checkRows(20)
testcaseFilename
=
os
.
path
.
split
(
__file__
)[
-
1
]
os
.
system
(
"rm -rf ./insert_res.txt"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录