Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
fd10ee01
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
fd10ee01
编写于
6月 01, 2021
作者:
B
bryanchang0603
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-4422] merging json files into 2 json files
上级
054ab0d8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
384 addition
and
65 deletion
+384
-65
tests/pytest/tools/taosdemoAllTest/insert-drop-exist-auto-N00.json
...est/tools/taosdemoAllTest/insert-drop-exist-auto-N00.json
+181
-0
tests/pytest/tools/taosdemoAllTest/insert-drop-exist-auto-Y00.json
...est/tools/taosdemoAllTest/insert-drop-exist-auto-Y00.json
+181
-0
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
...ytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
+22
-65
未找到文件。
tests/pytest/tools/taosdemoAllTest/insert-drop-exist-auto-N00.json
0 → 100644
浏览文件 @
fd10ee01
{
"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"
:
"NN123_"
,
"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"
}]
},{
"name"
:
"stb"
,
"child_table_exists"
:
"no"
,
"auto_create_table"
:
"no"
,
"childtable_count"
:
20
,
"childtable_prefix"
:
"NNN_"
,
"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"
}]
},{
"name"
:
"stb"
,
"child_table_exists"
:
"no"
,
"auto_create_table"
:
"yes"
,
"childtable_count"
:
20
,
"childtable_prefix"
:
"NNY_"
,
"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"
}]
},{
"name"
:
"stb"
,
"child_table_exists"
:
"yes"
,
"auto_create_table"
:
"123"
,
"childtable_count"
:
20
,
"childtable_prefix"
:
"NY123_"
,
"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"
}]
},{
"name"
:
"stb"
,
"child_table_exists"
:
"yes"
,
"auto_create_table"
:
"no"
,
"childtable_count"
:
20
,
"childtable_prefix"
:
"NYN_"
,
"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"
}]
},{
"name"
:
"stb"
,
"child_table_exists"
:
"yes"
,
"auto_create_table"
:
"yes"
,
"childtable_count"
:
20
,
"childtable_prefix"
:
"NYY_"
,
"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-Y00.json
0 → 100644
浏览文件 @
fd10ee01
{
"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"
:
"YN123_"
,
"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"
}]
},{
"name"
:
"stb"
,
"child_table_exists"
:
"no"
,
"auto_create_table"
:
"no"
,
"childtable_count"
:
20
,
"childtable_prefix"
:
"YNN_"
,
"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"
}]
},{
"name"
:
"stb"
,
"child_table_exists"
:
"no"
,
"auto_create_table"
:
"yes"
,
"childtable_count"
:
20
,
"childtable_prefix"
:
"YNY_"
,
"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"
}]
},{
"name"
:
"stb"
,
"child_table_exists"
:
"yes"
,
"auto_create_table"
:
"123"
,
"childtable_count"
:
20
,
"childtable_prefix"
:
"YY123_"
,
"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"
}]
},{
"name"
:
"stb"
,
"child_table_exists"
:
"yes"
,
"auto_create_table"
:
"no"
,
"childtable_count"
:
20
,
"childtable_prefix"
:
"YYN_"
,
"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"
}]
},{
"name"
:
"stb"
,
"child_table_exists"
:
"yes"
,
"auto_create_table"
:
"yes"
,
"childtable_count"
:
20
,
"childtable_prefix"
:
"YYY_"
,
"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
浏览文件 @
fd10ee01
...
...
@@ -253,84 +253,41 @@ class TDTestCase:
tdSql
.
query
(
"select count (*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
15000
)
# insert: auto_create
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'
)
tdSql
.
checkRows
(
20
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insert-drop-exist-auto-YYN.json -y "
%
binPath
)
# drop = yes, exist = yes, auto_create = no
tdSql
.
execute
(
'use db'
)
tdSql
.
query
(
'show tables'
)
tdSql
.
checkRows
(
20
)
# # insert: auto_create
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insert-drop-exist-auto-YNY.json -y "
%
binPath
)
# drop = yes, exist = no, auto_create = yes
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db'
)
tdSql
.
execute
(
'use db'
)
tdSql
.
query
(
'show tables'
)
tdSql
.
checkRows
(
20
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insert-drop-exist-auto-YNN.json -y "
%
binPath
)
# drop = yes, exist = no, auto_create = no
os
.
system
(
"%staosdemo -y -f tools/taosdemoAllTest/insert-drop-exist-auto-N00.json "
%
binPath
)
# drop = no, child_table_exists, auto_create_table varies
tdSql
.
execute
(
'use db'
)
tdSql
.
query
(
'show tables
'
)
tdSql
.
query
(
'show tables
like
\'
NN123%
\'
'
)
#child_table_exists = no, auto_create_table varies = 123
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-NYY.json -y "
%
binPath
)
# drop = no, exist = yes, auto_create = yes
tdSql
.
query
(
'show tables'
)
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
.
execute
(
'drop database db'
)
tdSql
.
execute
(
'create database db'
)
tdSql
.
execute
(
'use db'
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insert-drop-exist-auto-NYN.json -y "
%
binPath
)
# drop = no, exist = yes, auto_create = no
tdSql
.
execute
(
'use db'
)
tdSql
.
query
(
'show tables'
)
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 db'
)
tdSql
.
execute
(
'create database db'
)
tdSql
.
execute
(
'use db'
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insert-drop-exist-auto-NNY.json -y "
%
binPath
)
# drop = no, exist = no, auto_create = yes
tdSql
.
execute
(
'drop database if exists db'
)
os
.
system
(
"%staosdemo -y -f tools/taosdemoAllTest/insert-drop-exist-auto-Y00.json "
%
binPath
)
# drop = yes, child_table_exists, auto_create_table varies
tdSql
.
execute
(
'use db'
)
tdSql
.
query
(
'show tables
'
)
tdSql
.
query
(
'show tables
like
\'
YN123%
\'
'
)
#child_table_exists = no, auto_create_table varies = 123
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-NNN.json -y "
%
binPath
)
# drop = no, exist = no, auto_create = no
tdSql
.
execute
(
'use db'
)
tdSql
.
query
(
'show tables'
)
tdSql
.
query
(
'show tables like
\'
YNN%
\'
'
)
#child_table_exists = no, auto_create_table varies = no
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
.
query
(
'show tables like
\'
YNY%
\'
'
)
#child_table_exists = no, auto_create_table varies = yes
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
.
query
(
'show tables like
\'
YYN%
\'
'
)
#child_table_exists = yes, auto_create_table varies = no
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
.
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
)
os
.
system
(
"rm -rf ./insert_res.txt"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录