Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Tonvia
TDengine
提交
980df538
T
TDengine
项目概览
Tonvia
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
980df538
编写于
5月 06, 2021
作者:
haoranc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-3998]<test>: add taodemo-testcase that inserting too many rows won't make ts disorder
上级
23093b6f
变更
29
隐藏空白更改
内联
并排
Showing
29 changed file
with
1867 addition
and
76 deletion
+1867
-76
tests/pytest/tools/taosdemoAllTest/insert-1s1tnt1r.json
tests/pytest/tools/taosdemoAllTest/insert-1s1tnt1r.json
+4
-4
tests/pytest/tools/taosdemoAllTest/insert-1s1tntmr.json
tests/pytest/tools/taosdemoAllTest/insert-1s1tntmr.json
+4
-4
tests/pytest/tools/taosdemoAllTest/insert-disorder.json
tests/pytest/tools/taosdemoAllTest/insert-disorder.json
+1
-1
tests/pytest/tools/taosdemoAllTest/insert-illegal.json
tests/pytest/tools/taosdemoAllTest/insert-illegal.json
+8
-8
tests/pytest/tools/taosdemoAllTest/insert-interval-speed.json
...s/pytest/tools/taosdemoAllTest/insert-interval-speed.json
+3
-3
tests/pytest/tools/taosdemoAllTest/insert-newdb.json
tests/pytest/tools/taosdemoAllTest/insert-newdb.json
+1
-1
tests/pytest/tools/taosdemoAllTest/insertBinaryLenLarge16374AllcolLar16384.json
...sdemoAllTest/insertBinaryLenLarge16374AllcolLar16384.json
+140
-0
tests/pytest/tools/taosdemoAllTest/insertColumnsAndTagNum1024.json
...est/tools/taosdemoAllTest/insertColumnsAndTagNum1024.json
+62
-0
tests/pytest/tools/taosdemoAllTest/insertColumnsAndTagNumLarge1024.json
...ools/taosdemoAllTest/insertColumnsAndTagNumLarge1024.json
+62
-0
tests/pytest/tools/taosdemoAllTest/insertColumnsNum0.json
tests/pytest/tools/taosdemoAllTest/insertColumnsNum0.json
+62
-0
tests/pytest/tools/taosdemoAllTest/insertNumOfrecordPerReq0.json
...ytest/tools/taosdemoAllTest/insertNumOfrecordPerReq0.json
+8
-8
tests/pytest/tools/taosdemoAllTest/insertNumOfrecordPerReqless0.json
...t/tools/taosdemoAllTest/insertNumOfrecordPerReqless0.json
+9
-9
tests/pytest/tools/taosdemoAllTest/insertSigcolumnsNum1024.json
...pytest/tools/taosdemoAllTest/insertSigcolumnsNum1024.json
+62
-0
tests/pytest/tools/taosdemoAllTest/insertTagsNumLarge128.json
...s/pytest/tools/taosdemoAllTest/insertTagsNumLarge128.json
+0
-26
tests/pytest/tools/taosdemoAllTest/insertTimestepMulRowsLargeint16.json
...ools/taosdemoAllTest/insertTimestepMulRowsLargeint16.json
+65
-0
tests/pytest/tools/taosdemoAllTest/query-interrupt.json
tests/pytest/tools/taosdemoAllTest/query-interrupt.json
+62
-0
tests/pytest/tools/taosdemoAllTest/query-interrupt.py
tests/pytest/tools/taosdemoAllTest/query-interrupt.py
+88
-0
tests/pytest/tools/taosdemoAllTest/queryQps.json
tests/pytest/tools/taosdemoAllTest/queryQps.json
+37
-0
tests/pytest/tools/taosdemoAllTest/querySpeciMutisql100.json
tests/pytest/tools/taosdemoAllTest/querySpeciMutisql100.json
+429
-0
tests/pytest/tools/taosdemoAllTest/querySuperMutisql100.json
tests/pytest/tools/taosdemoAllTest/querySuperMutisql100.json
+419
-0
tests/pytest/tools/taosdemoAllTest/queryall.json
tests/pytest/tools/taosdemoAllTest/queryall.json
+14
-0
tests/pytest/tools/taosdemoAllTest/speciQueryInsertdata.json
tests/pytest/tools/taosdemoAllTest/speciQueryInsertdata.json
+1
-1
tests/pytest/tools/taosdemoAllTest/speciQueryRestful.json
tests/pytest/tools/taosdemoAllTest/speciQueryRestful.json
+38
-0
tests/pytest/tools/taosdemoAllTest/speciQueryTaosc.json
tests/pytest/tools/taosdemoAllTest/speciQueryTaosc.json
+1
-0
tests/pytest/tools/taosdemoAllTest/sub.json
tests/pytest/tools/taosdemoAllTest/sub.json
+37
-0
tests/pytest/tools/taosdemoAllTest/subInsertdata.json
tests/pytest/tools/taosdemoAllTest/subInsertdata.json
+61
-0
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
...ytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
+42
-7
tests/pytest/tools/taosdemoAllTest/taosdemoTestQueryWithJson.py
...pytest/tools/taosdemoAllTest/taosdemoTestQueryWithJson.py
+48
-4
tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py
...s/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py
+99
-0
未找到文件。
tests/pytest/tools/taosdemoAllTest/insert-1s1tnt1r.json
浏览文件 @
980df538
...
...
@@ -55,8 +55,8 @@
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
1
0
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
3
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
6
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
5
}]
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
1
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
1
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
1
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
1
}]
},
{
"name"
:
"stb1"
,
...
...
@@ -81,8 +81,8 @@
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
4
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
3
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
6
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
5
}]
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
1
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
1
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
1
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
1
}]
}]
}]
}
tests/pytest/tools/taosdemoAllTest/insert-1s1tntmr.json
浏览文件 @
980df538
...
...
@@ -55,8 +55,8 @@
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
1
0
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
3
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
6
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
5
}]
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
1
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
1
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
1
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
1
}]
},
{
"name"
:
"stb1"
,
...
...
@@ -81,8 +81,8 @@
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
1
0
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
3
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
6
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
5
}]
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
1
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
1
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
1
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
1
}]
}]
}]
}
tests/pytest/tools/taosdemoAllTest/insert-disorder.json
浏览文件 @
980df538
...
...
@@ -6,7 +6,7 @@
"user"
:
"root"
,
"password"
:
"taosdata"
,
"thread_count"
:
4
,
""
:
4
,
"
thread_count_create_tbl
"
:
4
,
"result_file"
:
"./insert_res.txt"
,
"confirm_parameter_prompt"
:
"no"
,
"insert_interval"
:
0
,
...
...
tests/pytest/tools/taosdemoAllTest/insert-illegal
-columns-count-0
.json
→
tests/pytest/tools/taosdemoAllTest/insert-illegal.json
浏览文件 @
980df538
...
...
@@ -11,8 +11,8 @@
"confirm_parameter_prompt"
:
"no"
,
"insert_interval"
:
0
,
"interlace_rows"
:
10
,
"num_of_records_per_req"
:
100
,
"max_sql_len"
:
1024000
0000
,
"num_of_records_per_req"
:
"-asdf"
,
"max_sql_len"
:
1024000
,
"databases"
:
[{
"dbinfo"
:
{
"name"
:
"db"
,
...
...
@@ -41,12 +41,12 @@
"batch_create_tbl_num"
:
10
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
1000
,
"insert_rows"
:
1000
0
,
"childtable_limit"
:
0
,
"childtable_offset"
:
0
,
"multi_thread_write_one_tbl"
:
"no"
,
"interlace_rows"
:
0
,
"insert_interval"
:
0
,
"insert_interval"
:
-4
,
"max_sql_len"
:
1024000
,
"disorder_ratio"
:
0
,
"disorder_range"
:
1000
,
...
...
@@ -55,8 +55,8 @@
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
0
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
3
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
6
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
7
}]
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
1
0
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
3
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
6
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
5
}]
},
{
"name"
:
"stb1"
,
...
...
@@ -64,10 +64,10 @@
"childtable_count"
:
20
,
"childtable_prefix"
:
"stb01_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
12
,
"batch_create_tbl_num"
:
"asdf"
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
2000
,
"insert_rows"
:
2000
0
,
"childtable_limit"
:
0
,
"childtable_offset"
:
0
,
"multi_thread_write_one_tbl"
:
"no"
,
...
...
tests/pytest/tools/taosdemoAllTest/insert-interval-speed.json
浏览文件 @
980df538
...
...
@@ -55,7 +55,7 @@
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
1
0
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
3
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
6
}],
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
1
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
1
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
6
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
5
}]
},
{
...
...
@@ -81,8 +81,8 @@
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
9
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
3
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
6
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
5
}]
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
1
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
1
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
1
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
1
}]
}]
}]
}
tests/pytest/tools/taosdemoAllTest/insert-newdb.json
浏览文件 @
980df538
...
...
@@ -55,7 +55,7 @@
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
6
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
3
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
6
}],
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
1
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
1
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
1
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
5
}]
},
{
...
...
tests/pytest/tools/taosdemoAllTest/insertBinaryLenLarge16374AllcolLar16384.json
0 → 100644
浏览文件 @
980df538
{
"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"
:
10
,
"num_of_records_per_req"
:
10240000000
,
"max_sql_len"
:
10240000000
,
"databases"
:
[{
"dbinfo"
:
{
"name"
:
"db"
,
"drop"
:
"yes"
,
"replica"
:
1
,
"days"
:
10
,
"cache"
:
50
,
"blocks"
:
8
,
"precision"
:
"ms"
,
"keep"
:
365
,
"minRows"
:
100
,
"maxRows"
:
4096
,
"comp"
:
2
,
"walLevel"
:
1
,
"cachelast"
:
0
,
"quorum"
:
1
,
"fsync"
:
3000
,
"update"
:
0
},
"super_tables"
:
[{
"name"
:
"stb0"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
1
,
"childtable_prefix"
:
"stb00_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
10
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
1
,
"childtable_limit"
:
0
,
"childtable_offset"
:
0
,
"multi_thread_write_one_tbl"
:
"no"
,
"interlace_rows"
:
0
,
"insert_interval"
:
0
,
"max_sql_len"
:
1024000
,
"disorder_ratio"
:
0
,
"disorder_range"
:
1000
,
"timestamp_step"
:
1
,
"start_timestamp"
:
"2020-10-01 00:00:00.000"
,
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"BINARY"
,
"len"
:
16374
,
"count"
:
1
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
12
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
2
}]
},
{
"name"
:
"stb1"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
1
,
"childtable_prefix"
:
"stb01_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
12
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
1
,
"childtable_limit"
:
0
,
"childtable_offset"
:
0
,
"multi_thread_write_one_tbl"
:
"no"
,
"interlace_rows"
:
1000000
,
"insert_interval"
:
0
,
"max_sql_len"
:
1024000
,
"disorder_ratio"
:
0
,
"disorder_range"
:
1000
,
"timestamp_step"
:
1
,
"start_timestamp"
:
"2020-10-01 00:00:00.000"
,
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"BINARY"
,
"len"
:
16370
,
"count"
:
1
},{
"type"
:
"INT"
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
5
}]
},
{
"name"
:
"stb2"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
1
,
"childtable_prefix"
:
"stb01_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
12
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
1
,
"childtable_limit"
:
0
,
"childtable_offset"
:
0
,
"multi_thread_write_one_tbl"
:
"no"
,
"interlace_rows"
:
1000000
,
"insert_interval"
:
0
,
"max_sql_len"
:
1024000
,
"disorder_ratio"
:
0
,
"disorder_range"
:
1000
,
"timestamp_step"
:
1
,
"start_timestamp"
:
"2020-10-01 00:00:00.000"
,
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"BINARY"
,
"len"
:
16375
,
"count"
:
1
},{
"type"
:
"INT"
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
5
}]
},
{
"name"
:
"stb3"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
1
,
"childtable_prefix"
:
"stb01_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
12
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
1
,
"childtable_limit"
:
0
,
"childtable_offset"
:
0
,
"multi_thread_write_one_tbl"
:
"no"
,
"interlace_rows"
:
1000000
,
"insert_interval"
:
0
,
"max_sql_len"
:
1024000
,
"disorder_ratio"
:
0
,
"disorder_range"
:
1000
,
"timestamp_step"
:
1
,
"start_timestamp"
:
"2020-10-01 00:00:00.000"
,
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"BINARY"
,
"len"
:
16371
,
"count"
:
1
},{
"type"
:
"INT"
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
5
}]
}]
}]
}
tests/pytest/tools/taosdemoAllTest/insertColumnsAndTagNum1024.json
0 → 100644
浏览文件 @
980df538
{
"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"
:
0
,
"num_of_records_per_req"
:
1000
,
"max_sql_len"
:
10240000000
,
"databases"
:
[{
"dbinfo"
:
{
"name"
:
"db"
,
"drop"
:
"yes"
,
"replica"
:
1
,
"days"
:
10
,
"cache"
:
50
,
"blocks"
:
8
,
"precision"
:
"ms"
,
"keep"
:
365
,
"minRows"
:
100
,
"maxRows"
:
4096
,
"comp"
:
2
,
"walLevel"
:
1
,
"cachelast"
:
0
,
"quorum"
:
1
,
"fsync"
:
3000
,
"update"
:
0
},
"super_tables"
:
[{
"name"
:
"stb0"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
10
,
"childtable_prefix"
:
"stb00_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
10
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
1000
,
"childtable_limit"
:
0
,
"childtable_offset"
:
0
,
"multi_thread_write_one_tbl"
:
"no"
,
"interlace_rows"
:
0
,
"insert_interval"
:
0
,
"max_sql_len"
:
1024000
,
"disorder_ratio"
:
0
,
"disorder_range"
:
1000
,
"timestamp_step"
:
1
,
"start_timestamp"
:
"2020-10-01 00:00:00.000"
,
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
1004
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
3
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
6
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
7
}]
}]
}]
}
tests/pytest/tools/taosdemoAllTest/insertColumnsAndTagNumLarge1024.json
0 → 100644
浏览文件 @
980df538
{
"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"
:
10000
,
"num_of_records_per_req"
:
10000
,
"max_sql_len"
:
10240000000
,
"databases"
:
[{
"dbinfo"
:
{
"name"
:
"db"
,
"drop"
:
"yes"
,
"replica"
:
1
,
"days"
:
10
,
"cache"
:
50
,
"blocks"
:
8
,
"precision"
:
"ms"
,
"keep"
:
365
,
"minRows"
:
100
,
"maxRows"
:
4096
,
"comp"
:
2
,
"walLevel"
:
1
,
"cachelast"
:
0
,
"quorum"
:
1
,
"fsync"
:
3000
,
"update"
:
0
},
"super_tables"
:
[{
"name"
:
"stb0"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
10
,
"childtable_prefix"
:
"stb00_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
10
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
1000
,
"childtable_limit"
:
0
,
"childtable_offset"
:
0
,
"multi_thread_write_one_tbl"
:
"no"
,
"interlace_rows"
:
0
,
"insert_interval"
:
0
,
"max_sql_len"
:
1024000
,
"disorder_ratio"
:
0
,
"disorder_range"
:
1000
,
"timestamp_step"
:
1
,
"start_timestamp"
:
"2020-10-01 00:00:00.000"
,
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
1005
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
3
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
6
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
7
}]
}]
}]
}
tests/pytest/tools/taosdemoAllTest/insertColumnsNum0.json
0 → 100644
浏览文件 @
980df538
{
"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"
:
10
,
"num_of_records_per_req"
:
100
,
"max_sql_len"
:
10240000000
,
"databases"
:
[{
"dbinfo"
:
{
"name"
:
"db"
,
"drop"
:
"yes"
,
"replica"
:
1
,
"days"
:
10
,
"cache"
:
50
,
"blocks"
:
8
,
"precision"
:
"ms"
,
"keep"
:
365
,
"minRows"
:
100
,
"maxRows"
:
4096
,
"comp"
:
2
,
"walLevel"
:
1
,
"cachelast"
:
0
,
"quorum"
:
1
,
"fsync"
:
3000
,
"update"
:
0
},
"super_tables"
:
[{
"name"
:
"stb0"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
10
,
"childtable_prefix"
:
"stb00_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
10
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
1000
,
"childtable_limit"
:
0
,
"childtable_offset"
:
0
,
"multi_thread_write_one_tbl"
:
"no"
,
"interlace_rows"
:
0
,
"insert_interval"
:
0
,
"max_sql_len"
:
1024000
,
"disorder_ratio"
:
0
,
"disorder_range"
:
1000
,
"timestamp_step"
:
1
,
"start_timestamp"
:
"2020-10-01 00:00:00.000"
,
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
0
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
3
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
6
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
7
}]
}]
}]
}
tests/pytest/tools/taosdemoAllTest/insert
-illegal-columns
.json
→
tests/pytest/tools/taosdemoAllTest/insert
NumOfrecordPerReq0
.json
浏览文件 @
980df538
...
...
@@ -11,7 +11,7 @@
"confirm_parameter_prompt"
:
"no"
,
"insert_interval"
:
0
,
"interlace_rows"
:
10
,
"num_of_records_per_req"
:
10
0
,
"num_of_records_per_req"
:
0
,
"max_sql_len"
:
10240000000
,
"databases"
:
[{
"dbinfo"
:
{
...
...
@@ -35,13 +35,13 @@
"super_tables"
:
[{
"name"
:
"stb0"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
1
0
,
"childtable_count"
:
1
,
"childtable_prefix"
:
"stb00_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
10
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
1
000
,
"insert_rows"
:
1
,
"childtable_limit"
:
0
,
"childtable_offset"
:
0
,
"multi_thread_write_one_tbl"
:
"no"
,
...
...
@@ -55,19 +55,19 @@
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"
INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
1005
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
3
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
6
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
7
}]
"columns"
:
[{
"type"
:
"
BINARY"
,
"len"
:
1
,
"count"
:
1
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
1
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
2
}]
},
{
"name"
:
"stb1"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
2
0
,
"childtable_count"
:
2
,
"childtable_prefix"
:
"stb01_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
12
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
2
000
,
"insert_rows"
:
2
,
"childtable_limit"
:
0
,
"childtable_offset"
:
0
,
"multi_thread_write_one_tbl"
:
"no"
,
...
...
@@ -81,7 +81,7 @@
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"
INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
10
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
3
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
6
}],
"columns"
:
[{
"type"
:
"
BINARY"
,
"len"
:
1
,
"count"
:
1
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
5
}]
}]
}]
...
...
tests/pytest/tools/taosdemoAllTest/insert
-illegal-columns-lmax
.json
→
tests/pytest/tools/taosdemoAllTest/insert
NumOfrecordPerReqless0
.json
浏览文件 @
980df538
...
...
@@ -11,7 +11,7 @@
"confirm_parameter_prompt"
:
"no"
,
"insert_interval"
:
0
,
"interlace_rows"
:
10
,
"num_of_records_per_req"
:
100
,
"num_of_records_per_req"
:
-1
,
"max_sql_len"
:
10240000000
,
"databases"
:
[{
"dbinfo"
:
{
...
...
@@ -35,13 +35,13 @@
"super_tables"
:
[{
"name"
:
"stb0"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
1
0
,
"childtable_count"
:
1
,
"childtable_prefix"
:
"stb00_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
10
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
1
000
,
"insert_rows"
:
1
,
"childtable_limit"
:
0
,
"childtable_offset"
:
0
,
"multi_thread_write_one_tbl"
:
"no"
,
...
...
@@ -55,19 +55,19 @@
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"
INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
1024
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
3
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
6
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
7
}]
"columns"
:
[{
"type"
:
"
BINARY"
,
"len"
:
1
,
"count"
:
1
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
1
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
2
}]
},
{
"name"
:
"stb1"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
2
0
,
"childtable_count"
:
2
,
"childtable_prefix"
:
"stb01_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
12
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
2
000
,
"insert_rows"
:
2
,
"childtable_limit"
:
0
,
"childtable_offset"
:
0
,
"multi_thread_write_one_tbl"
:
"no"
,
...
...
@@ -81,8 +81,8 @@
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"
INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
1004
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
3
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
6
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
7
}]
"columns"
:
[{
"type"
:
"
BINARY"
,
"len"
:
1
,
"count"
:
1
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
5
}]
}]
}]
}
tests/pytest/tools/taosdemoAllTest/insertSigcolumnsNum1024.json
0 → 100644
浏览文件 @
980df538
{
"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"
:
10
,
"num_of_records_per_req"
:
100
,
"max_sql_len"
:
10240000000
,
"databases"
:
[{
"dbinfo"
:
{
"name"
:
"db"
,
"drop"
:
"yes"
,
"replica"
:
1
,
"days"
:
10
,
"cache"
:
50
,
"blocks"
:
8
,
"precision"
:
"ms"
,
"keep"
:
365
,
"minRows"
:
100
,
"maxRows"
:
4096
,
"comp"
:
2
,
"walLevel"
:
1
,
"cachelast"
:
0
,
"quorum"
:
1
,
"fsync"
:
3000
,
"update"
:
0
},
"super_tables"
:
[{
"name"
:
"stb0"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
10
,
"childtable_prefix"
:
"stb00_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
10
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
1000
,
"childtable_limit"
:
0
,
"childtable_offset"
:
0
,
"multi_thread_write_one_tbl"
:
"no"
,
"interlace_rows"
:
0
,
"insert_interval"
:
0
,
"max_sql_len"
:
1024000
,
"disorder_ratio"
:
0
,
"disorder_range"
:
1000
,
"timestamp_step"
:
1
,
"start_timestamp"
:
"2020-10-01 00:00:00.000"
,
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"DOUBLE"
,
"count"
:
1024
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
7
}]
}]
}]
}
tests/pytest/tools/taosdemoAllTest/insert
-illegal-tags-count129
.json
→
tests/pytest/tools/taosdemoAllTest/insert
TagsNumLarge128
.json
浏览文件 @
980df538
...
...
@@ -57,32 +57,6 @@
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
1
},
{
"type"
:
"BIGINT"
,
"count"
:
1
},
{
"type"
:
"float"
,
"count"
:
1
},
{
"type"
:
"double"
,
"count"
:
1
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
3
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
6
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
127
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
2
}]
},
{
"name"
:
"stb1"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
20
,
"childtable_prefix"
:
"stb01_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
12
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
2000
,
"childtable_limit"
:
0
,
"childtable_offset"
:
0
,
"multi_thread_write_one_tbl"
:
"no"
,
"interlace_rows"
:
0
,
"insert_interval"
:
0
,
"max_sql_len"
:
1024000
,
"disorder_ratio"
:
0
,
"disorder_range"
:
1000
,
"timestamp_step"
:
1
,
"start_timestamp"
:
"2020-10-01 00:00:00.000"
,
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
10
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
3
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
6
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
5
}]
}]
}]
}
tests/pytest/tools/taosdemoAllTest/insertTimestepMulRowsLargeint16.json
0 → 100644
浏览文件 @
980df538
{
"filetype"
:
"insert"
,
"cfgdir"
:
"/etc/taos"
,
"host"
:
"localhost"
,
"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
,
"databases"
:
[
{
"dbinfo"
:
{
"name"
:
"blf"
,
"drop"
:
"yes"
},
"super_tables"
:
[
{
"name"
:
"p_0_topics"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
10
,
"childtable_prefix"
:
"p_0_topics_"
,
"auto_create_table"
:
"no"
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
525600
,
"multi_thread_write_one_tbl"
:
"no"
,
"interlace_rows"
:
1000
,
"max_sql_len"
:
1048576
,
"disorder_ratio"
:
0
,
"disorder_range"
:
1000
,
"timestamp_step"
:
60000
,
"start_timestamp"
:
"2019-10-01 00:00:00.000"
,
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[
{
"type"
:
"INT"
,
"count"
:
1
},
{
"type"
:
"FLOAT"
,
"count"
:
1
},
{
"type"
:
"BINARY"
,
"len"
:
12
,
"count"
:
1
}
],
"tags"
:
[
{
"type"
:
"BINARY"
,
"len"
:
12
,
"count"
:
10
}
]
}
]
}
]
}
\ No newline at end of file
tests/pytest/tools/taosdemoAllTest/query-interrupt.json
0 → 100644
浏览文件 @
980df538
{
"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"
:
1000
,
"max_sql_len"
:
1024000
,
"databases"
:
[{
"dbinfo"
:
{
"name"
:
"db"
,
"drop"
:
"yes"
,
"replica"
:
1
,
"days"
:
10
,
"cache"
:
50
,
"blocks"
:
8
,
"precision"
:
"ms"
,
"keep"
:
365
,
"minRows"
:
100
,
"maxRows"
:
4096
,
"comp"
:
2
,
"walLevel"
:
1
,
"cachelast"
:
0
,
"quorum"
:
1
,
"fsync"
:
3000
,
"update"
:
0
},
"super_tables"
:
[{
"name"
:
"stb0"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
100
,
"childtable_prefix"
:
"stb00_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
20
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
150000
,
"childtable_limit"
:
-1
,
"childtable_offset"
:
0
,
"multi_thread_write_one_tbl"
:
"no"
,
"interlace_rows"
:
1000
,
"insert_interval"
:
0
,
"max_sql_len"
:
1024000
,
"disorder_ratio"
:
0
,
"disorder_range"
:
1000
,
"timestamp_step"
:
1
,
"start_timestamp"
:
"2020-10-01 00:00:00.000"
,
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
10
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
3
},
{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
6
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
5
}]
}]
}]
}
tests/pytest/tools/taosdemoAllTest/query-interrupt.py
0 → 100644
浏览文件 @
980df538
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import
sys
import
os
import
subprocess
import
time
from
util.log
import
*
from
util.cases
import
*
from
util.sql
import
*
from
util.dnodes
import
*
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
def
getBuildPath
(
self
):
selfPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
if
(
"community"
in
selfPath
):
projPath
=
selfPath
[:
selfPath
.
find
(
"community"
)]
else
:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
break
return
buildPath
def
run
(
self
):
tdSql
.
prepare
()
buildPath
=
self
.
getBuildPath
()
if
(
buildPath
==
""
):
tdLog
.
exit
(
"taosd not found!"
)
else
:
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
binPath
=
buildPath
+
"/build/bin/"
# # insert 1000w rows in stb0
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/query-interrupt.json -y "
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count (tbname) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
60
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
6000000
)
os
.
system
(
'%staosdemo -f tools/taosdemoAllTest/queryall.json -y & '
%
binPath
)
time
.
sleep
(
2
)
query_pid
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep "taosdemoAllTest/queryall.json" |grep -v "grep"|awk
\'
{print $2}
\'
'
)[
1
])
taosd_cpu_load_1
=
float
(
subprocess
.
getstatusoutput
(
'top -n 1 -b -p $(ps aux|grep "bin/taosd -c"|grep -v "grep" |awk
\'
{print $2}
\'
)|awk
\'
END{print}
\'
|awk
\'
{print $9}
\'
'
)[
1
])
if
taosd_cpu_load_1
>
10.0
:
os
.
system
(
"kill -9 %d"
%
query_pid
)
time
.
sleep
(
5
)
taosd_cpu_load_2
=
float
(
subprocess
.
getstatusoutput
(
'top -n 1 -b -p $(ps aux|grep "bin/taosd -c"|grep -v "grep" |awk
\'
{print $2}
\'
)|awk
\'
END{print}
\'
|awk
\'
{print $9}
\'
'
)[
1
])
if
taosd_cpu_load_2
<
10.0
:
suc_kill
=
60
else
:
suc_kill
=
10
print
(
"taosd_cpu_load is higher than 10%"
)
else
:
suc_kill
=
20
print
(
"taosd_cpu_load is still less than 10%"
)
tdSql
.
query
(
"select count (tbname) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
"%d"
%
suc_kill
)
os
.
system
(
"rm -rf querySystemInfo*"
)
os
.
system
(
"rm -rf insert_res.txt"
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/tools/taosdemoAllTest/queryQps.json
0 → 100644
浏览文件 @
980df538
{
"filetype"
:
"query"
,
"cfgdir"
:
"/etc/taos"
,
"host"
:
"127.0.0.1"
,
"port"
:
6030
,
"user"
:
"root"
,
"password"
:
"taosdata"
,
"confirm_parameter_prompt"
:
"no"
,
"databases"
:
"db"
,
"query_times"
:
1
,
"specified_table_query"
:
{
"query_interval"
:
0
,
"concurrent"
:
1
,
"sqls"
:
[
{
"sql"
:
"select last_row(*) from stb00_0"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_99 "
,
"result"
:
"./query_res1.txt"
}]
},
"super_table_query"
:
{
"stblname"
:
"stb1"
,
"query_interval"
:
0
,
"threads"
:
1
,
"sqls"
:
[
{
"sql"
:
"select last_row(ts) from xxxx"
,
"result"
:
"./query_res2.txt"
}
]
}
}
\ No newline at end of file
tests/pytest/tools/taosdemoAllTest/querySpeciMutisql100.json
0 → 100644
浏览文件 @
980df538
{
"filetype"
:
"query"
,
"cfgdir"
:
"/etc/taos"
,
"host"
:
"127.0.0.1"
,
"port"
:
6030
,
"user"
:
"root"
,
"password"
:
"taosdata"
,
"confirm_parameter_prompt"
:
"no"
,
"databases"
:
"db"
,
"query_times"
:
2
,
"specified_table_query"
:
{
"query_interval"
:
1
,
"concurrent"
:
3
,
"sqls"
:
[
{
"sql"
:
"select last_row(*) from stb00_0"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_1"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_2"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_3"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_4"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_5"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_6"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_7"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_8"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_9"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_10 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_11 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_12 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_13 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_14 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_15 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_16 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_17 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_18 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_19 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_20 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_21 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_22 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_23 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_24 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_25 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_26 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_27 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_28 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_29 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_30 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_31 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_32 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_33 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_34 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_35 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_36 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_37 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_38 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_39 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_40 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_41 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_42 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_43 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_44 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_45 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_46 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_47 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_48 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_49 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_50 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_51 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_52 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_53 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_54 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_55 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_56 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_57 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_58 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_59 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_60"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_61"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_62"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_63"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_64"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_65"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_66"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_67"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_68"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_69"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_70 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_71 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_72 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_73 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_74 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_75 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_76 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_77 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_78 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_79 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_80 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_81 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_82 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_83 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_84 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_85 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_86 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_87 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_88 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_89 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_90 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_91 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_92 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_93 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_94 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_95 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_96 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_97 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_98 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb00_99 "
,
"result"
:
"./query_res0.txt"
}]
},
"super_table_query"
:
{
"stblname"
:
"stb1"
,
"query_interval"
:
1
,
"threads"
:
3
,
"sqls"
:
[
{
"sql"
:
"select last_row(ts) from xxxx"
,
"result"
:
"./query_res2.txt"
}
]
}
}
\ No newline at end of file
tests/pytest/tools/taosdemoAllTest/querySuperMutisql100.json
0 → 100644
浏览文件 @
980df538
{
"filetype"
:
"query"
,
"cfgdir"
:
"/etc/taos"
,
"host"
:
"127.0.0.1"
,
"port"
:
6030
,
"user"
:
"root"
,
"password"
:
"taosdata"
,
"confirm_parameter_prompt"
:
"no"
,
"databases"
:
"db"
,
"query_times"
:
3
,
"super_table_query"
:
{
"stblname"
:
"stb0"
,
"query_interval"
:
10000
,
"concurrent"
:
9
,
"sqls"
:
[
{
"sql"
:
"select last_row(*) from xxxx"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from xxxx "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select * from xxxx "
,
"result"
:
"./query_res0.txt"
}]
}
}
\ No newline at end of file
tests/pytest/tools/taosdemoAllTest/queryall.json
0 → 100644
浏览文件 @
980df538
{
"filetype"
:
"query"
,
"cfgdir"
:
"/etc/taos"
,
"host"
:
"127.0.0.1"
,
"port"
:
6030
,
"user"
:
"root"
,
"password"
:
"taosdata"
,
"confirm_parameter_prompt"
:
"no"
,
"databases"
:
"db"
,
"specified_table_query"
:
{
"query_interval"
:
1
,
"concurrent"
:
1
,
"sqls"
:
[{
"sql"
:
"select * from stb0"
,
"result"
:
""
}]
}
}
\ No newline at end of file
tests/pytest/tools/taosdemoAllTest/speciQueryInsertdata.json
浏览文件 @
980df538
...
...
@@ -69,7 +69,7 @@
"insert_rows"
:
200
,
"childtable_limit"
:
0
,
"childtable_offset"
:
0
,
"interlace_rows"
:
0
,
"interlace_rows"
:
0
,
"insert_interval"
:
0
,
"max_sql_len"
:
1024000
,
"disorder_ratio"
:
0
,
...
...
tests/pytest/tools/taosdemoAllTest/speciQueryRestful.json
0 → 100644
浏览文件 @
980df538
{
"filetype"
:
"query"
,
"cfgdir"
:
"/etc/taos"
,
"host"
:
"127.0.0.1"
,
"port"
:
6030
,
"user"
:
"root"
,
"password"
:
"taosdata"
,
"confirm_parameter_prompt"
:
"no"
,
"databases"
:
"db"
,
"query_times"
:
2
,
"query_mode"
:
"restful"
,
"specified_table_query"
:
{
"query_interval"
:
1
,
"concurrent"
:
3
,
"sqls"
:
[
{
"sql"
:
"select last_row(*) from db.stb0 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select count(*) from db.stb00_1"
,
"result"
:
"./query_res1.txt"
}
]
},
"super_table_query"
:
{
"stblname"
:
"stb1"
,
"query_interval"
:
1
,
"threads"
:
3
,
"sqls"
:
[
{
"sql"
:
"select last_row(ts) from xxxx"
,
"result"
:
"./query_res2.txt"
}
]
}
}
\ No newline at end of file
tests/pytest/tools/taosdemoAllTest/speciQuery.json
→
tests/pytest/tools/taosdemoAllTest/speciQuery
Taosc
.json
浏览文件 @
980df538
...
...
@@ -8,6 +8,7 @@
"confirm_parameter_prompt"
:
"no"
,
"databases"
:
"db"
,
"query_times"
:
2
,
"query_mode"
:
"taosc"
,
"specified_table_query"
:
{
"query_interval"
:
1
,
"concurrent"
:
3
,
...
...
tests/pytest/tools/taosdemoAllTest/sub.json
0 → 100644
浏览文件 @
980df538
{
"filetype"
:
"subscribe"
,
"cfgdir"
:
"/etc/taos"
,
"host"
:
"127.0.0.1"
,
"port"
:
6030
,
"user"
:
"root"
,
"password"
:
"taosdata"
,
"databases"
:
"db"
,
"confirm_parameter_prompt"
:
"no"
,
"specified_table_query"
:
{
"concurrent"
:
1
,
"mode"
:
"sync"
,
"interval"
:
0
,
"restart"
:
"yes"
,
"keepProgress"
:
"yes"
,
"sqls"
:
[
{
"sql"
:
"select * from stb00_0 ;"
,
"result"
:
"./subscribe_res0.txt"
}]
},
"super_table_query"
:
{
"stblname"
:
"stb0"
,
"threads"
:
1
,
"mode"
:
"sync"
,
"interval"
:
10000
,
"restart"
:
"yes"
,
"keepProgress"
:
"yes"
,
"sqls"
:
[
{
"sql"
:
"select * from xxxx where ts > '2021-02-25 11:35:00.000' ;"
,
"result"
:
"./subscribe_res1.txt"
}]
}
}
\ No newline at end of file
tests/pytest/tools/taosdemoAllTest/subInsertdata.json
0 → 100644
浏览文件 @
980df538
{
"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"
:
0
,
"num_of_records_per_req"
:
3000
,
"max_sql_len"
:
1024000
,
"databases"
:
[{
"dbinfo"
:
{
"name"
:
"db"
,
"drop"
:
"yes"
,
"replica"
:
1
,
"days"
:
10
,
"cache"
:
16
,
"blocks"
:
8
,
"precision"
:
"ms"
,
"keep"
:
365
,
"minRows"
:
100
,
"maxRows"
:
4096
,
"comp"
:
2
,
"walLevel"
:
1
,
"cachelast"
:
0
,
"quorum"
:
1
,
"fsync"
:
3000
,
"update"
:
0
},
"super_tables"
:
[{
"name"
:
"stb0"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
1
,
"childtable_prefix"
:
"stb00_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
10
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
1
,
"childtable_limit"
:
0
,
"childtable_offset"
:
0
,
"interlace_rows"
:
0
,
"insert_interval"
:
0
,
"max_sql_len"
:
1024000
,
"disorder_ratio"
:
0
,
"disorder_range"
:
0
,
"timestamp_step"
:
1000
,
"start_timestamp"
:
"2021-02-25 10:00:00.000"
,
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"BINARY"
,
"len"
:
50
,
"count"
:
1
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
1
},
{
"type"
:
"INT"
},
{
"type"
:
"DOUBLE"
,
"count"
:
1
}],
"tags"
:
[{
"type"
:
"TINYINT"
,
"count"
:
2
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
5
}]
}]
}]
}
\ No newline at end of file
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
浏览文件 @
980df538
...
...
@@ -153,19 +153,54 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
160
)
# insert: let parament in json file is illegal
,i need know how to write exception
.
# insert: let parament in json file is illegal
, it'll expect error
.
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insert
-illegal-columns
.json -y "
%
binPath
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insert
ColumnsAndTagNumLarge1024
.json -y "
%
binPath
)
tdSql
.
error
(
"use db"
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insert-illegal-columns-lmax.json -y "
%
binPath
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insertSigcolumnsNum1024.json -y "
%
binPath
)
tdSql
.
error
(
"select * from db.stb0"
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insert-illegal-columns-count-0.json -y "
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insertColumnsAndTagNum1024.json -y "
%
binPath
)
tdSql
.
query
(
"select count(*) from db.stb0"
)
tdSql
.
checkData
(
0
,
0
,
10000
)
tdSql
.
checkData
(
0
,
0
,
10000
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insertColumnsNum0.json -y "
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"show stables like 'stb0%' "
)
tdSql
.
checkData
(
0
,
2
,
11
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insert
-illegal-tags-count129
.json -y "
%
binPath
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insert
TagsNumLarge128
.json -y "
%
binPath
)
tdSql
.
error
(
"use db1"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insertBinaryLenLarge16374AllcolLar16384.json -y "
%
binPath
)
tdSql
.
query
(
"select count(*) from db.stb0"
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"select count(*) from db.stb1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
error
(
"select * from db.stb3"
)
tdSql
.
error
(
"select * from db.stb2"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insertNumOfrecordPerReq0.json -y "
%
binPath
)
tdSql
.
query
(
"select count(*) from db.stb0"
)
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
"select * from db.stb1"
)
tdSql
.
checkRows
(
0
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insertNumOfrecordPerReqless0.json -y "
%
binPath
)
tdSql
.
error
(
"select count(*) from db.stb0"
)
tdSql
.
error
(
"select * from db.stb1"
)
tdSql
.
execute
(
"drop database if exists blf"
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insertTimestepMulRowsLargeint16.json -y "
%
binPath
)
tdSql
.
execute
(
"use blf"
)
tdSql
.
query
(
"select ts from blf.p_0_topics_7 limit 262800,1"
)
tdSql
.
checkData
(
0
,
0
,
"2020-03-31 12:00:00.000"
)
tdSql
.
query
(
"select first(ts) from blf.p_0_topics_2"
)
tdSql
.
checkData
(
0
,
0
,
"2019-10-01 00:00:00"
)
tdSql
.
query
(
"select last(ts) from blf.p_0_topics_6 "
)
tdSql
.
checkData
(
0
,
0
,
"2020-09-29 23:59:00"
)
# insert: timestamp and step
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/insert-timestep.json -y "
%
binPath
)
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestQueryWithJson.py
浏览文件 @
980df538
...
...
@@ -49,10 +49,9 @@ class TDTestCase:
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
binPath
=
buildPath
+
"/build/bin/"
# insert: drop and child_table_exists combination test
# insert: using parament "childtable_offset and childtable_limit" to control table'offset point and offset
# query: query specified table and query super table
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/speciQueryInsertdata.json"
%
binPath
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/speciQuery.json"
%
binPath
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/speciQuery
Taosc
.json"
%
binPath
)
os
.
system
(
"cat query_res0.txt* |sort -u > all_query_res0.txt"
)
os
.
system
(
"cat query_res1.txt* |sort -u > all_query_res1.txt"
)
os
.
system
(
"cat query_res2.txt* |sort -u > all_query_res2.txt"
)
...
...
@@ -75,9 +74,54 @@ class TDTestCase:
timest
=
d2
.
strftime
(
"%Y-%m-%d %H:%M:%S.%f"
)
tdSql
.
query
(
"select last_row(ts) from stb1"
)
tdSql
.
checkData
(
0
,
0
,
"%s"
%
timest
)
# # delete useless files
# os.system("rm -rf ./insert_res.txt")
# os.system("rm -rf tools/taosdemoAllTest/*.py.sql")
# os.system("rm -rf ./querySystemInfo*")
# os.system("rm -rf ./query_res*")
# os.system("rm -rf ./all_query*")
# os.system("rm -rf ./test_query_res0.txt")
# # use restful api to query
# os.system("%staosdemo -f tools/taosdemoAllTest/speciQueryRestful.json" % binPath)
# os.system("cat query_res0.txt* |sort -u > all_query_res0.txt")
# os.system("cat query_res1.txt* |sort -u > all_query_res1.txt")
# os.system("cat query_res2.txt* |sort -u > all_query_res2.txt")
# tdSql.execute("use db")
# tdSql.execute('create table result0 using stb0 tags(121,43,"beijing","beijing","beijing","beijing","beijing")')
# os.system("python3 tools/taosdemoAllTest/convertResFile.py")
# tdSql.execute("insert into result0 file './test_query_res0.txt'")
# tdSql.query("select ts from result0")
# tdSql.checkData(0, 0, "2020-11-01 00:00:00.099000")
# tdSql.query("select count(*) from result0")
# tdSql.checkData(0, 0, 1)
# with open('./all_query_res1.txt','r+') as f1:
# result1 = int(f1.readline())
# tdSql.query("select count(*) from stb00_1")
# tdSql.checkData(0, 0, "%d" % result1)
# with open('./all_query_res2.txt','r+') as f2:
# result2 = int(f2.readline())
# d2 = datetime.fromtimestamp(result2/1000)
# timest = d2.strftime("%Y-%m-%d %H:%M:%S.%f")
# tdSql.query("select last_row(ts) from stb1")
# tdSql.checkData(0, 0, "%s" % timest)
# query times less than or equal to 100
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/querySpeciMutisql100.json"
%
binPath
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/querySuperMutisql100.json"
%
binPath
)
# query result print QPS
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/queryQps.json"
%
binPath
)
# delete useless files
os
.
system
(
"rm -rf ./insert_res.txt"
)
os
.
system
(
"rm -rf tools/taosdemoAllTest/
taosdemoTestQuerytWithJson
.py.sql"
)
os
.
system
(
"rm -rf tools/taosdemoAllTest/
*
.py.sql"
)
os
.
system
(
"rm -rf ./querySystemInfo*"
)
os
.
system
(
"rm -rf ./query_res*"
)
os
.
system
(
"rm -rf ./all_query*"
)
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py
0 → 100644
浏览文件 @
980df538
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import
sys
import
os
from
util.log
import
*
from
util.cases
import
*
from
util.sql
import
*
from
util.dnodes
import
*
import
time
from
datetime
import
datetime
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
def
getBuildPath
(
self
):
selfPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
if
(
"community"
in
selfPath
):
projPath
=
selfPath
[:
selfPath
.
find
(
"community"
)]
else
:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
break
return
buildPath
def
run
(
self
):
buildPath
=
self
.
getBuildPath
()
if
(
buildPath
==
""
):
tdLog
.
exit
(
"taosd not found!"
)
else
:
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
binPath
=
buildPath
+
"/build/bin/"
# query: query specified table and query super table
# os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdata.json" % binPath)
# os.system("%staosdemo -f tools/taosdemoAllTest/sub.json" % binPath)
# os.system("cat query_res0.txt* |sort -u > all_query_res0.txt")
# os.system("cat query_res1.txt* |sort -u > all_query_res1.txt")
# os.system("cat query_res2.txt* |sort -u > all_query_res2.txt")
# tdSql.execute("use db")
# tdSql.execute('create table result0 using stb0 tags(121,43,"beijing","beijing","beijing","beijing","beijing")')
# os.system("python3 tools/taosdemoAllTest/convertResFile.py")
# tdSql.execute("insert into result0 file './test_query_res0.txt'")
# tdSql.query("select ts from result0")
# tdSql.checkData(0, 0, "2020-11-01 00:00:00.099000")
# tdSql.query("select count(*) from result0")
# tdSql.checkData(0, 0, 1)
# with open('./all_query_res1.txt','r+') as f1:
# result1 = int(f1.readline())
# tdSql.query("select count(*) from stb00_1")
# tdSql.checkData(0, 0, "%d" % result1)
# with open('./all_query_res2.txt','r+') as f2:
# result2 = int(f2.readline())
# d2 = datetime.fromtimestamp(result2/1000)
# timest = d2.strftime("%Y-%m-%d %H:%M:%S.%f")
# tdSql.query("select last_row(ts) from stb1")
# tdSql.checkData(0, 0, "%s" % timest)
# # query times less than or equal to 100
# os.system("%staosdemo -f tools/taosdemoAllTest/QuerySpeciMutisql100.json" % binPath)
# os.system("%staosdemo -f tools/taosdemoAllTest/QuerySuperMutisql100.json" % binPath)
# delete useless files
# os.system("rm -rf ./insert_res.txt")
# os.system("rm -rf tools/taosdemoAllTest/*.py.sql")
# os.system("rm -rf ./querySystemInfo*")
# os.system("rm -rf ./query_res*")
# os.system("rm -rf ./all_query*")
# os.system("rm -rf ./test_query_res0.txt")
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录