Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
f26a6a23
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f26a6a23
编写于
6月 01, 2021
作者:
B
bryanchang0603
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-4422] adding test case for auto_create_table exception cases
上级
0cf6c3c4
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
268 addition
and
1 deletion
+268
-1
tests/pytest/tools/taosdemoAllTest/insert-drop-exist-auto-NN123.json
...t/tools/taosdemoAllTest/insert-drop-exist-auto-NN123.json
+60
-0
tests/pytest/tools/taosdemoAllTest/insert-drop-exist-auto-NY123.json
...t/tools/taosdemoAllTest/insert-drop-exist-auto-NY123.json
+60
-0
tests/pytest/tools/taosdemoAllTest/insert-drop-exist-auto-YN123.json
...t/tools/taosdemoAllTest/insert-drop-exist-auto-YN123.json
+60
-0
tests/pytest/tools/taosdemoAllTest/insert-drop-exist-auto-YY123.json
...t/tools/taosdemoAllTest/insert-drop-exist-auto-YY123.json
+60
-0
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
...ytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
+28
-1
未找到文件。
tests/pytest/tools/taosdemoAllTest/insert-drop-exist-auto-NN123.json
0 → 100644
浏览文件 @
f26a6a23
{
"filetype"
:
"insert"
,
"cfgdir"
:
"/etc/taos"
,
"host"
:
"127.0.0.1"
,
"port"
:
6030
,
"user"
:
"root"
,
"password"
:
"taosdata"
,
"thread_count"
:
4
,
"thread_count_create_tbl"
:
4
,
"result_file"
:
"./insert_res.txt"
,
"confirm_parameter_prompt"
:
"no"
,
"insert_interval"
:
0
,
"interlace_rows"
:
100
,
"num_of_records_per_req"
:
100
,
"databases"
:
[{
"dbinfo"
:
{
"name"
:
"db"
,
"drop"
:
"no"
,
"replica"
:
1
,
"days"
:
10
,
"cache"
:
16
,
"blocks"
:
8
,
"precision"
:
"ms"
,
"keep"
:
3650
,
"minRows"
:
100
,
"maxRows"
:
4096
,
"comp"
:
2
,
"walLevel"
:
1
,
"cachelast"
:
0
,
"quorum"
:
1
,
"fsync"
:
3000
,
"update"
:
0
},
"super_tables"
:
[{
"name"
:
"stb"
,
"child_table_exists"
:
"no"
,
"auto_create_table"
:
"123"
,
"childtable_count"
:
20
,
"childtable_prefix"
:
"stbEx_"
,
"batch_create_tbl_num"
:
100
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
5
,
"childtable_limit"
:
40
,
"childtable_offset"
:
0
,
"interlace_rows"
:
0
,
"insert_interval"
:
0
,
"max_sql_len"
:
1024000
,
"disorder_ratio"
:
0
,
"disorder_range"
:
1000
,
"timestamp_step"
:
10
,
"start_timestamp"
:
"now"
,
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"INT"
}],
"tags"
:
[{
"type"
:
"TINYINT"
}]
}]
}]
}
\ No newline at end of file
tests/pytest/tools/taosdemoAllTest/insert-drop-exist-auto-NY123.json
0 → 100644
浏览文件 @
f26a6a23
{
"filetype"
:
"insert"
,
"cfgdir"
:
"/etc/taos"
,
"host"
:
"127.0.0.1"
,
"port"
:
6030
,
"user"
:
"root"
,
"password"
:
"taosdata"
,
"thread_count"
:
4
,
"thread_count_create_tbl"
:
4
,
"result_file"
:
"./insert_res.txt"
,
"confirm_parameter_prompt"
:
"no"
,
"insert_interval"
:
0
,
"interlace_rows"
:
100
,
"num_of_records_per_req"
:
100
,
"databases"
:
[{
"dbinfo"
:
{
"name"
:
"db"
,
"drop"
:
"no"
,
"replica"
:
1
,
"days"
:
10
,
"cache"
:
16
,
"blocks"
:
8
,
"precision"
:
"ms"
,
"keep"
:
3650
,
"minRows"
:
100
,
"maxRows"
:
4096
,
"comp"
:
2
,
"walLevel"
:
1
,
"cachelast"
:
0
,
"quorum"
:
1
,
"fsync"
:
3000
,
"update"
:
0
},
"super_tables"
:
[{
"name"
:
"stb"
,
"child_table_exists"
:
"yes"
,
"auto_create_table"
:
"123"
,
"childtable_count"
:
20
,
"childtable_prefix"
:
"stbEx_"
,
"batch_create_tbl_num"
:
100
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
5
,
"childtable_limit"
:
40
,
"childtable_offset"
:
0
,
"interlace_rows"
:
0
,
"insert_interval"
:
0
,
"max_sql_len"
:
1024000
,
"disorder_ratio"
:
0
,
"disorder_range"
:
1000
,
"timestamp_step"
:
10
,
"start_timestamp"
:
"now"
,
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"INT"
}],
"tags"
:
[{
"type"
:
"TINYINT"
}]
}]
}]
}
\ No newline at end of file
tests/pytest/tools/taosdemoAllTest/insert-drop-exist-auto-YN123.json
0 → 100644
浏览文件 @
f26a6a23
{
"filetype"
:
"insert"
,
"cfgdir"
:
"/etc/taos"
,
"host"
:
"127.0.0.1"
,
"port"
:
6030
,
"user"
:
"root"
,
"password"
:
"taosdata"
,
"thread_count"
:
4
,
"thread_count_create_tbl"
:
4
,
"result_file"
:
"./insert_res.txt"
,
"confirm_parameter_prompt"
:
"no"
,
"insert_interval"
:
0
,
"interlace_rows"
:
100
,
"num_of_records_per_req"
:
100
,
"databases"
:
[{
"dbinfo"
:
{
"name"
:
"db"
,
"drop"
:
"yes"
,
"replica"
:
1
,
"days"
:
10
,
"cache"
:
16
,
"blocks"
:
8
,
"precision"
:
"ms"
,
"keep"
:
3650
,
"minRows"
:
100
,
"maxRows"
:
4096
,
"comp"
:
2
,
"walLevel"
:
1
,
"cachelast"
:
0
,
"quorum"
:
1
,
"fsync"
:
3000
,
"update"
:
0
},
"super_tables"
:
[{
"name"
:
"stb"
,
"child_table_exists"
:
"no"
,
"auto_create_table"
:
"123"
,
"childtable_count"
:
20
,
"childtable_prefix"
:
"stbEx_"
,
"batch_create_tbl_num"
:
100
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
5
,
"childtable_limit"
:
40
,
"childtable_offset"
:
0
,
"interlace_rows"
:
0
,
"insert_interval"
:
0
,
"max_sql_len"
:
1024000
,
"disorder_ratio"
:
0
,
"disorder_range"
:
1000
,
"timestamp_step"
:
10
,
"start_timestamp"
:
"now"
,
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"INT"
}],
"tags"
:
[{
"type"
:
"TINYINT"
}]
}]
}]
}
\ No newline at end of file
tests/pytest/tools/taosdemoAllTest/insert-drop-exist-auto-YY123.json
0 → 100644
浏览文件 @
f26a6a23
{
"filetype"
:
"insert"
,
"cfgdir"
:
"/etc/taos"
,
"host"
:
"127.0.0.1"
,
"port"
:
6030
,
"user"
:
"root"
,
"password"
:
"taosdata"
,
"thread_count"
:
4
,
"thread_count_create_tbl"
:
4
,
"result_file"
:
"./insert_res.txt"
,
"confirm_parameter_prompt"
:
"no"
,
"insert_interval"
:
0
,
"interlace_rows"
:
100
,
"num_of_records_per_req"
:
100
,
"databases"
:
[{
"dbinfo"
:
{
"name"
:
"db"
,
"drop"
:
"yes"
,
"replica"
:
1
,
"days"
:
10
,
"cache"
:
16
,
"blocks"
:
8
,
"precision"
:
"ms"
,
"keep"
:
3650
,
"minRows"
:
100
,
"maxRows"
:
4096
,
"comp"
:
2
,
"walLevel"
:
1
,
"cachelast"
:
0
,
"quorum"
:
1
,
"fsync"
:
3000
,
"update"
:
0
},
"super_tables"
:
[{
"name"
:
"stb"
,
"child_table_exists"
:
"yes"
,
"auto_create_table"
:
"123"
,
"childtable_count"
:
20
,
"childtable_prefix"
:
"stbEx_"
,
"batch_create_tbl_num"
:
100
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
5
,
"childtable_limit"
:
40
,
"childtable_offset"
:
0
,
"interlace_rows"
:
0
,
"insert_interval"
:
0
,
"max_sql_len"
:
1024000
,
"disorder_ratio"
:
0
,
"disorder_range"
:
1000
,
"timestamp_step"
:
10
,
"start_timestamp"
:
"now"
,
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"INT"
}],
"tags"
:
[{
"type"
:
"TINYINT"
}]
}]
}]
}
\ No newline at end of file
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
浏览文件 @
f26a6a23
...
...
@@ -254,7 +254,6 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
15000
)
# insert: auto_create
# todo: add exception input for auto_create_table eg:123
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insert-drop-exist-auto-YYY.json -y "
%
binPath
)
# drop = yes, exist = yes, auto_create = yes
tdSql
.
execute
(
'use db'
)
tdSql
.
query
(
'show tables'
)
...
...
@@ -306,6 +305,34 @@ class TDTestCase:
tdSql
.
query
(
'show tables'
)
tdSql
.
checkRows
(
20
)
#the following four test cases are for the exception cases for param auto_create_table
tdSql
.
execute
(
'drop database db'
)
tdSql
.
execute
(
'create database db'
)
tdSql
.
execute
(
'use db'
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insert-drop-exist-auto-NN123.json -y "
%
binPath
)
# drop = no, exist = no, auto_create = 123
tdSql
.
execute
(
'use db'
)
tdSql
.
query
(
'show tables'
)
tdSql
.
checkRows
(
20
)
tdSql
.
execute
(
'drop database db'
)
tdSql
.
execute
(
'create database db'
)
tdSql
.
execute
(
'use db'
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insert-drop-exist-auto-NY123.json -y "
%
binPath
)
# drop = no, exist = yes, auto_create = 123
tdSql
.
execute
(
'use db'
)
tdSql
.
query
(
'show tables'
)
tdSql
.
checkRows
(
0
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insert-drop-exist-auto-YN123.json -y "
%
binPath
)
# drop = yes, exist = no, auto_create = 123
tdSql
.
execute
(
'use db'
)
tdSql
.
query
(
'show tables'
)
tdSql
.
checkRows
(
20
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insert-drop-exist-auto-YY123.json -y "
%
binPath
)
# drop = yes, exist = yes, auto_create = 123
tdSql
.
execute
(
'use db'
)
tdSql
.
query
(
'show tables'
)
tdSql
.
checkRows
(
20
)
os
.
system
(
"rm -rf ./insert_res.txt"
)
os
.
system
(
"rm -rf tools/taosdemoAllTest/taosdemoTestInsertWithJson.py.sql"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录