Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
02d6309f
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
02d6309f
编写于
12月 14, 2021
作者:
haoranc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-10789]<test>:verify all data types in the taosdemo test of sml interface
上级
ed4e0033
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
81 addition
and
90 deletion
+81
-90
tests/pytest/tools/taosdemoAllTest/sml/insert-allDataType-sml.json
...est/tools/taosdemoAllTest/sml/insert-allDataType-sml.json
+3
-3
tests/pytest/tools/taosdemoAllTest/sml/insert-sml-json-alltype.json
...st/tools/taosdemoAllTest/sml/insert-sml-json-alltype.json
+5
-5
tests/pytest/tools/taosdemoAllTest/sml/insert-sml-telnet-alltype.json
.../tools/taosdemoAllTest/sml/insert-sml-telnet-alltype.json
+25
-25
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertAllType.py
...pytest/tools/taosdemoAllTest/taosdemoTestInsertAllType.py
+28
-37
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py
...st/tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py
+20
-20
未找到文件。
tests/pytest/tools/taosdemoAllTest/sml/insert-allDataType-sml.json
浏览文件 @
02d6309f
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
"super_tables"
:
[{
"super_tables"
:
[{
"name"
:
"stb0"
,
"name"
:
"stb0"
,
"child_table_exists"
:
"no"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
10
00
,
"childtable_count"
:
10
,
"childtable_prefix"
:
"stb00_"
,
"childtable_prefix"
:
"stb00_"
,
"auto_create_table"
:
"no"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
1
,
"batch_create_tbl_num"
:
1
,
...
@@ -55,13 +55,13 @@
...
@@ -55,13 +55,13 @@
"sample_format"
:
"csv"
,
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"
TIMESTAMP"
},
{
"type"
:
"
BIGINT"
},
{
"type"
:
"FLOAT"
},
{
"type"
:
"DOUBLE"
},
{
"type"
:
"SMALLINT"
},
{
"type"
:
"TINYINT"
},
{
"type"
:
"BOOL"
},
{
"type"
:
"NCHAR"
,
"len"
:
16
,
"count"
:
1
},
{
"type"
:
"UINT"
},
{
"type"
:
"UBIGINT"
},
{
"type"
:
"UTINYINT"
},
{
"type"
:
"USMALLINT"
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
1
}],
"columns"
:
[{
"type"
:
"INT"
},
{
"type"
:
"BIGINT"
},
{
"type"
:
"FLOAT"
},
{
"type"
:
"DOUBLE"
},
{
"type"
:
"SMALLINT"
},
{
"type"
:
"TINYINT"
},
{
"type"
:
"BOOL"
},
{
"type"
:
"NCHAR"
,
"len"
:
16
,
"count"
:
1
},
{
"type"
:
"UINT"
},
{
"type"
:
"UBIGINT"
},
{
"type"
:
"UTINYINT"
},
{
"type"
:
"USMALLINT"
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
1
}],
"tags"
:
[{
"type"
:
"INT"
},
{
"type"
:
"BIGINT"
},
{
"type"
:
"FLOAT"
},
{
"type"
:
"DOUBLE"
},
{
"type"
:
"SMALLINT"
},
{
"type"
:
"TINYINT"
},
{
"type"
:
"BOOL"
},
{
"type"
:
"NCHAR"
,
"len"
:
16
,
"count"
:
1
},
{
"type"
:
"UINT"
},
{
"type"
:
"UBIGINT"
},
{
"type"
:
"UTINYINT"
},
{
"type"
:
"USMALLINT"
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
1
}]
"tags"
:
[{
"type"
:
"INT"
},
{
"type"
:
"BIGINT"
},
{
"type"
:
"FLOAT"
},
{
"type"
:
"DOUBLE"
},
{
"type"
:
"SMALLINT"
},
{
"type"
:
"TINYINT"
},
{
"type"
:
"BOOL"
},
{
"type"
:
"NCHAR"
,
"len"
:
16
,
"count"
:
1
},
{
"type"
:
"UINT"
},
{
"type"
:
"UBIGINT"
},
{
"type"
:
"UTINYINT"
},
{
"type"
:
"USMALLINT"
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
1
}]
},
},
{
{
"name"
:
"stb1"
,
"name"
:
"stb1"
,
"child_table_exists"
:
"no"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
100
0
,
"childtable_count"
:
2
0
,
"childtable_prefix"
:
"stb01_"
,
"childtable_prefix"
:
"stb01_"
,
"auto_create_table"
:
"no"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
10
,
"batch_create_tbl_num"
:
10
,
...
...
tests/pytest/tools/taosdemoAllTest/sml/insert-sml-json-alltype.json
浏览文件 @
02d6309f
...
@@ -35,14 +35,14 @@
...
@@ -35,14 +35,14 @@
"super_tables"
:
[{
"super_tables"
:
[{
"name"
:
"stb0"
,
"name"
:
"stb0"
,
"child_table_exists"
:
"no"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
2
,
"childtable_count"
:
1
,
"childtable_prefix"
:
"stb00_"
,
"childtable_prefix"
:
"stb00_"
,
"auto_create_table"
:
"no"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
100
,
"batch_create_tbl_num"
:
100
,
"data_source"
:
"rand"
,
"data_source"
:
"rand"
,
"insert_mode"
:
"sml"
,
"insert_mode"
:
"sml"
,
"line_protocol"
:
"json"
,
"line_protocol"
:
"json"
,
"insert_rows"
:
5
0
,
"insert_rows"
:
1
0
,
"childtable_limit"
:
-1
,
"childtable_limit"
:
-1
,
"childtable_offset"
:
0
,
"childtable_offset"
:
0
,
"interlace_rows"
:
0
,
"interlace_rows"
:
0
,
...
@@ -59,16 +59,16 @@
...
@@ -59,16 +59,16 @@
"tags"
:
[{
"type"
:
"INT"
,
"count"
:
1
}]
"tags"
:
[{
"type"
:
"INT"
,
"count"
:
1
}]
},
},
{
{
"name"
:
"stb
2
"
,
"name"
:
"stb
1
"
,
"child_table_exists"
:
"no"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
4
,
"childtable_count"
:
2
,
"childtable_prefix"
:
"stb02_"
,
"childtable_prefix"
:
"stb02_"
,
"auto_create_table"
:
"no"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
100
,
"batch_create_tbl_num"
:
100
,
"data_source"
:
"rand"
,
"data_source"
:
"rand"
,
"insert_mode"
:
"sml"
,
"insert_mode"
:
"sml"
,
"line_protocol"
:
"json"
,
"line_protocol"
:
"json"
,
"insert_rows"
:
5
0
,
"insert_rows"
:
1
0
,
"childtable_limit"
:
-1
,
"childtable_limit"
:
-1
,
"childtable_offset"
:
0
,
"childtable_offset"
:
0
,
"interlace_rows"
:
32767
,
"interlace_rows"
:
32767
,
...
...
tests/pytest/tools/taosdemoAllTest/sml/insert-sml-telnet-alltype.json
浏览文件 @
02d6309f
...
@@ -35,14 +35,14 @@
...
@@ -35,14 +35,14 @@
"super_tables"
:
[{
"super_tables"
:
[{
"name"
:
"stb0"
,
"name"
:
"stb0"
,
"child_table_exists"
:
"no"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
2
,
"childtable_count"
:
1
,
"childtable_prefix"
:
"stb00_"
,
"childtable_prefix"
:
"stb00_"
,
"auto_create_table"
:
"no"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
100
,
"batch_create_tbl_num"
:
100
,
"data_source"
:
"rand"
,
"data_source"
:
"rand"
,
"insert_mode"
:
"sml"
,
"insert_mode"
:
"sml"
,
"line_protocol"
:
"telnet"
,
"line_protocol"
:
"telnet"
,
"insert_rows"
:
5
0
,
"insert_rows"
:
1
0
,
"childtable_limit"
:
-1
,
"childtable_limit"
:
-1
,
"childtable_offset"
:
0
,
"childtable_offset"
:
0
,
"interlace_rows"
:
0
,
"interlace_rows"
:
0
,
...
@@ -61,14 +61,14 @@
...
@@ -61,14 +61,14 @@
{
{
"name"
:
"stb1"
,
"name"
:
"stb1"
,
"child_table_exists"
:
"no"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
3
,
"childtable_count"
:
2
,
"childtable_prefix"
:
"stb01_"
,
"childtable_prefix"
:
"stb01_"
,
"auto_create_table"
:
"no"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
100
,
"batch_create_tbl_num"
:
100
,
"data_source"
:
"rand"
,
"data_source"
:
"rand"
,
"insert_mode"
:
"sml"
,
"insert_mode"
:
"sml"
,
"line_protocol"
:
"telnet"
,
"line_protocol"
:
"telnet"
,
"insert_rows"
:
5
0
,
"insert_rows"
:
1
0
,
"childtable_limit"
:
-1
,
"childtable_limit"
:
-1
,
"childtable_offset"
:
0
,
"childtable_offset"
:
0
,
"interlace_rows"
:
32767
,
"interlace_rows"
:
32767
,
...
@@ -87,14 +87,14 @@
...
@@ -87,14 +87,14 @@
{
{
"name"
:
"stb2"
,
"name"
:
"stb2"
,
"child_table_exists"
:
"no"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
4
,
"childtable_count"
:
3
,
"childtable_prefix"
:
"stb02_"
,
"childtable_prefix"
:
"stb02_"
,
"auto_create_table"
:
"no"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
100
,
"batch_create_tbl_num"
:
100
,
"data_source"
:
"rand"
,
"data_source"
:
"rand"
,
"insert_mode"
:
"sml"
,
"insert_mode"
:
"sml"
,
"line_protocol"
:
"telnet"
,
"line_protocol"
:
"telnet"
,
"insert_rows"
:
5
0
,
"insert_rows"
:
1
0
,
"childtable_limit"
:
-1
,
"childtable_limit"
:
-1
,
"childtable_offset"
:
0
,
"childtable_offset"
:
0
,
"interlace_rows"
:
32767
,
"interlace_rows"
:
32767
,
...
@@ -113,14 +113,14 @@
...
@@ -113,14 +113,14 @@
{
{
"name"
:
"stb3"
,
"name"
:
"stb3"
,
"child_table_exists"
:
"no"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
5
,
"childtable_count"
:
4
,
"childtable_prefix"
:
"stb03_"
,
"childtable_prefix"
:
"stb03_"
,
"auto_create_table"
:
"no"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
100
,
"batch_create_tbl_num"
:
100
,
"data_source"
:
"rand"
,
"data_source"
:
"rand"
,
"insert_mode"
:
"sml"
,
"insert_mode"
:
"sml"
,
"line_protocol"
:
"telnet"
,
"line_protocol"
:
"telnet"
,
"insert_rows"
:
5
0
,
"insert_rows"
:
1
0
,
"childtable_limit"
:
-1
,
"childtable_limit"
:
-1
,
"childtable_offset"
:
0
,
"childtable_offset"
:
0
,
"interlace_rows"
:
32767
,
"interlace_rows"
:
32767
,
...
@@ -139,14 +139,14 @@
...
@@ -139,14 +139,14 @@
{
{
"name"
:
"stb4"
,
"name"
:
"stb4"
,
"child_table_exists"
:
"no"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
6
,
"childtable_count"
:
5
,
"childtable_prefix"
:
"stb04_"
,
"childtable_prefix"
:
"stb04_"
,
"auto_create_table"
:
"no"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
100
,
"batch_create_tbl_num"
:
100
,
"data_source"
:
"rand"
,
"data_source"
:
"rand"
,
"insert_mode"
:
"sml"
,
"insert_mode"
:
"sml"
,
"line_protocol"
:
"telnet"
,
"line_protocol"
:
"telnet"
,
"insert_rows"
:
3
0
,
"insert_rows"
:
1
0
,
"childtable_limit"
:
-1
,
"childtable_limit"
:
-1
,
"childtable_offset"
:
0
,
"childtable_offset"
:
0
,
"interlace_rows"
:
32767
,
"interlace_rows"
:
32767
,
...
@@ -165,14 +165,14 @@
...
@@ -165,14 +165,14 @@
{
{
"name"
:
"stb5"
,
"name"
:
"stb5"
,
"child_table_exists"
:
"no"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
15
,
"childtable_count"
:
6
,
"childtable_prefix"
:
"stb05_"
,
"childtable_prefix"
:
"stb05_"
,
"auto_create_table"
:
"no"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
100
,
"batch_create_tbl_num"
:
100
,
"data_source"
:
"rand"
,
"data_source"
:
"rand"
,
"insert_mode"
:
"sml"
,
"insert_mode"
:
"sml"
,
"line_protocol"
:
"telnet"
,
"line_protocol"
:
"telnet"
,
"insert_rows"
:
2
0
,
"insert_rows"
:
1
0
,
"childtable_limit"
:
-1
,
"childtable_limit"
:
-1
,
"childtable_offset"
:
0
,
"childtable_offset"
:
0
,
"interlace_rows"
:
32767
,
"interlace_rows"
:
32767
,
...
@@ -191,7 +191,7 @@
...
@@ -191,7 +191,7 @@
{
{
"name"
:
"stb6"
,
"name"
:
"stb6"
,
"child_table_exists"
:
"no"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
20
,
"childtable_count"
:
7
,
"childtable_prefix"
:
"stb06_"
,
"childtable_prefix"
:
"stb06_"
,
"auto_create_table"
:
"no"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
100
,
"batch_create_tbl_num"
:
100
,
...
@@ -217,14 +217,14 @@
...
@@ -217,14 +217,14 @@
{
{
"name"
:
"stb7"
,
"name"
:
"stb7"
,
"child_table_exists"
:
"no"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
30
,
"childtable_count"
:
8
,
"childtable_prefix"
:
"stb07_"
,
"childtable_prefix"
:
"stb07_"
,
"auto_create_table"
:
"no"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
100
,
"batch_create_tbl_num"
:
100
,
"data_source"
:
"rand"
,
"data_source"
:
"rand"
,
"insert_mode"
:
"sml"
,
"insert_mode"
:
"sml"
,
"line_protocol"
:
"telnet"
,
"line_protocol"
:
"telnet"
,
"insert_rows"
:
5
,
"insert_rows"
:
10
,
"childtable_limit"
:
-1
,
"childtable_limit"
:
-1
,
"childtable_offset"
:
0
,
"childtable_offset"
:
0
,
"interlace_rows"
:
32767
,
"interlace_rows"
:
32767
,
...
@@ -243,14 +243,14 @@
...
@@ -243,14 +243,14 @@
{
{
"name"
:
"stb8"
,
"name"
:
"stb8"
,
"child_table_exists"
:
"no"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
20
,
"childtable_count"
:
9
,
"childtable_prefix"
:
"stb08_"
,
"childtable_prefix"
:
"stb08_"
,
"auto_create_table"
:
"no"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
100
,
"batch_create_tbl_num"
:
100
,
"data_source"
:
"rand"
,
"data_source"
:
"rand"
,
"insert_mode"
:
"sml"
,
"insert_mode"
:
"sml"
,
"line_protocol"
:
"telnet"
,
"line_protocol"
:
"telnet"
,
"insert_rows"
:
3
0
,
"insert_rows"
:
1
0
,
"childtable_limit"
:
-1
,
"childtable_limit"
:
-1
,
"childtable_offset"
:
0
,
"childtable_offset"
:
0
,
"interlace_rows"
:
32767
,
"interlace_rows"
:
32767
,
...
@@ -269,14 +269,14 @@
...
@@ -269,14 +269,14 @@
{
{
"name"
:
"stb9"
,
"name"
:
"stb9"
,
"child_table_exists"
:
"no"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
3
,
"childtable_count"
:
10
,
"childtable_prefix"
:
"stb09_"
,
"childtable_prefix"
:
"stb09_"
,
"auto_create_table"
:
"no"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
100
,
"batch_create_tbl_num"
:
100
,
"data_source"
:
"rand"
,
"data_source"
:
"rand"
,
"insert_mode"
:
"sml"
,
"insert_mode"
:
"sml"
,
"line_protocol"
:
"telnet"
,
"line_protocol"
:
"telnet"
,
"insert_rows"
:
5
0
,
"insert_rows"
:
1
0
,
"childtable_limit"
:
-1
,
"childtable_limit"
:
-1
,
"childtable_offset"
:
0
,
"childtable_offset"
:
0
,
"interlace_rows"
:
32767
,
"interlace_rows"
:
32767
,
...
@@ -295,14 +295,14 @@
...
@@ -295,14 +295,14 @@
{
{
"name"
:
"stb10"
,
"name"
:
"stb10"
,
"child_table_exists"
:
"no"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
3
,
"childtable_count"
:
11
,
"childtable_prefix"
:
"stb10_"
,
"childtable_prefix"
:
"stb10_"
,
"auto_create_table"
:
"no"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
100
,
"batch_create_tbl_num"
:
100
,
"data_source"
:
"rand"
,
"data_source"
:
"rand"
,
"insert_mode"
:
"sml"
,
"insert_mode"
:
"sml"
,
"line_protocol"
:
"telnet"
,
"line_protocol"
:
"telnet"
,
"insert_rows"
:
5
0
,
"insert_rows"
:
1
0
,
"childtable_limit"
:
-1
,
"childtable_limit"
:
-1
,
"childtable_offset"
:
0
,
"childtable_offset"
:
0
,
"interlace_rows"
:
32767
,
"interlace_rows"
:
32767
,
...
@@ -321,14 +321,14 @@
...
@@ -321,14 +321,14 @@
{
{
"name"
:
"stb11"
,
"name"
:
"stb11"
,
"child_table_exists"
:
"no"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
3
,
"childtable_count"
:
12
,
"childtable_prefix"
:
"stb11_"
,
"childtable_prefix"
:
"stb11_"
,
"auto_create_table"
:
"no"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
100
,
"batch_create_tbl_num"
:
100
,
"data_source"
:
"rand"
,
"data_source"
:
"rand"
,
"insert_mode"
:
"sml"
,
"insert_mode"
:
"sml"
,
"line_protocol"
:
"telnet"
,
"line_protocol"
:
"telnet"
,
"insert_rows"
:
5
0
,
"insert_rows"
:
1
0
,
"childtable_limit"
:
-1
,
"childtable_limit"
:
-1
,
"childtable_offset"
:
0
,
"childtable_offset"
:
0
,
"interlace_rows"
:
32767
,
"interlace_rows"
:
32767
,
...
@@ -347,14 +347,14 @@
...
@@ -347,14 +347,14 @@
{
{
"name"
:
"stb12"
,
"name"
:
"stb12"
,
"child_table_exists"
:
"no"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
3
,
"childtable_count"
:
1
3
,
"childtable_prefix"
:
"stb12_"
,
"childtable_prefix"
:
"stb12_"
,
"auto_create_table"
:
"no"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
100
,
"batch_create_tbl_num"
:
100
,
"data_source"
:
"rand"
,
"data_source"
:
"rand"
,
"insert_mode"
:
"sml"
,
"insert_mode"
:
"sml"
,
"line_protocol"
:
"telnet"
,
"line_protocol"
:
"telnet"
,
"insert_rows"
:
5
0
,
"insert_rows"
:
1
0
,
"childtable_limit"
:
-1
,
"childtable_limit"
:
-1
,
"childtable_offset"
:
0
,
"childtable_offset"
:
0
,
"interlace_rows"
:
32767
,
"interlace_rows"
:
32767
,
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertAllType.py
浏览文件 @
02d6309f
...
@@ -48,7 +48,7 @@ class TDTestCase:
...
@@ -48,7 +48,7 @@ class TDTestCase:
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
#
insert: create one or mutiple tables per sql and insert multiple rows per sql
#
taosc interface
os
.
system
(
"%staosBenchmark -f tools/taosdemoAllTest/insert-allDataType.json -y "
%
binPath
)
os
.
system
(
"%staosBenchmark -f tools/taosdemoAllTest/insert-allDataType.json -y "
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count (tbname) from stb0"
)
tdSql
.
query
(
"select count (tbname) from stb0"
)
...
@@ -81,54 +81,45 @@ class TDTestCase:
...
@@ -81,54 +81,45 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
200000
)
tdSql
.
checkData
(
0
,
0
,
200000
)
# insert-interface: sml
# insert-interface: sml
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insert-allDataType-sml.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sml/insert-allDataType-sml.json -y "
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count (tbname) from stb0"
)
tdSql
.
query
(
"select count (tbname) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
10
)
tdSql
.
checkData
(
0
,
0
,
10
)
tdSql
.
query
(
"select count (tbname) from stb1"
)
tdSql
.
query
(
"select count (tbname) from stb1"
)
tdSql
.
checkData
(
0
,
0
,
20
)
tdSql
.
checkData
(
0
,
0
,
20
)
tdSql
.
query
(
"select last(ts) from db.stb00_0"
)
#
tdSql.query("select last(ts) from db.stb00_0")
tdSql
.
checkData
(
0
,
0
,
"2020-10-01 00:00:00.019000"
)
#
tdSql.checkData(0, 0, "2020-10-01 00:00:00.019000")
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
2
00
)
tdSql
.
checkData
(
0
,
0
,
10
00
)
tdSql
.
query
(
"select last(ts) from db.stb01_0"
)
#
tdSql.query("select last(ts) from db.stb01_0")
tdSql
.
checkData
(
0
,
0
,
"2020-11-01 00:00:00.190000"
)
#
tdSql.checkData(0, 0, "2020-11-01 00:00:00.190000")
tdSql
.
query
(
"select count(*) from stb1"
)
tdSql
.
query
(
"select count(*) from stb1"
)
tdSql
.
checkData
(
0
,
0
,
400
)
tdSql
.
checkData
(
0
,
0
,
400
0
)
# insert-interface: sml-json
# # insert-interface: sml-json
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/sml/insert-sml-json-alltype.json -y "
%
binPath
)
# os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-sml-json-alltype.json -y " % binPath)
tdSql
.
execute
(
"use db"
)
# tdSql.execute("use db")
tdSql
.
query
(
"select count (tbname) from stb0"
)
# tdSql.query("show stables")
tdSql
.
checkData
(
0
,
0
,
10
)
# for i in range(13):
tdSql
.
query
(
"select count (tbname) from stb1"
)
# for j in range(13):
tdSql
.
checkData
(
0
,
0
,
20
)
# if tdSql.queryResult[i][0] == 'stb%d'%j:
tdSql
.
query
(
"select last(ts) from db.stb00_0"
)
# # print(i,"stb%d"%j)
tdSql
.
checkData
(
0
,
0
,
"2020-10-01 00:00:00.019000"
)
# tdSql.checkData(i, 4, j+1)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
200
)
tdSql
.
query
(
"select last(ts) from db.stb01_0"
)
tdSql
.
checkData
(
0
,
0
,
"2020-11-01 00:00:00.190000"
)
tdSql
.
query
(
"select count(*) from stb1"
)
tdSql
.
checkData
(
0
,
0
,
400
)
# insert-interface: sml-telnet
# insert-interface: sml-telnet
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insert-sml-telnet-alltype.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sml/insert-sml-telnet-alltype.json -y "
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count (tbname) from stb0"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
checkData
(
0
,
0
,
10
)
for
i
in
range
(
13
):
tdSql
.
query
(
"select count (tbname) from stb1"
)
for
j
in
range
(
13
):
tdSql
.
checkData
(
0
,
0
,
20
)
if
tdSql
.
queryResult
[
i
][
0
]
==
'stb%d'
%
j
:
tdSql
.
query
(
"select last(ts) from db.stb00_0"
)
# print(i,"stb%d"%j)
tdSql
.
checkData
(
0
,
0
,
"2020-10-01 00:00:00.019000"
)
tdSql
.
checkData
(
i
,
4
,
j
+
1
)
tdSql
.
query
(
"select count(*) from stb0"
)
for
i
in
range
(
13
):
tdSql
.
checkData
(
0
,
0
,
200
)
tdSql
.
query
(
"select count(*) from stb%d"
%
i
)
tdSql
.
query
(
"select last(ts) from db.stb01_0"
)
tdSql
.
checkData
(
0
,
0
,
(
i
+
1
)
*
10
)
tdSql
.
checkData
(
0
,
0
,
"2020-11-01 00:00:00.190000"
)
tdSql
.
query
(
"select count(*) from stb1"
)
tdSql
.
checkData
(
0
,
0
,
400
)
# insert-interface: sml-telnet
# insert-interface: sml-telnet
assert
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/sml/insert-sml-timestamp.json -y "
%
binPath
)
!=
0
assert
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/sml/insert-sml-timestamp.json -y "
%
binPath
)
!=
0
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py
浏览文件 @
02d6309f
...
@@ -74,22 +74,22 @@ class TDTestCase:
...
@@ -74,22 +74,22 @@ class TDTestCase:
tdSql
.
query
(
"select count(*) from stb1"
)
tdSql
.
query
(
"select count(*) from stb1"
)
tdSql
.
checkData
(
0
,
0
,
3000
)
tdSql
.
checkData
(
0
,
0
,
3000
)
# insert: using parament "insert_interval to controls spped of insert.
#
#
insert: using parament "insert_interval to controls spped of insert.
# but We need to have accurate methods to control the speed, such as getting the speed value, checking the count and so on。
#
#
but We need to have accurate methods to control the speed, such as getting the speed value, checking the count and so on。
os
.
system
(
"%staosBenchmark -f tools/taosdemoAllTest/sml/insert-interval-speed-sml.json -y"
%
binPath
)
#
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-interval-speed-sml.json -y" % binPath)
tdSql
.
execute
(
"use db"
)
#
tdSql.execute("use db")
tdSql
.
query
(
"select tbname from
stb0"
)
# tdSql.query("select tbname from db.
stb0")
tdSql
.
checkRows
(
100
)
#
tdSql.checkRows(100 )
# tdSql.query("select count(*) from stb00_0")
#
#
tdSql.query("select count(*) from stb00_0")
# tdSql.checkData(0, 0, 20)
#
#
tdSql.checkData(0, 0, 20)
tdSql
.
query
(
"select count(*) from stb0"
)
#
tdSql.query("select count(*) from stb0")
tdSql
.
checkData
(
0
,
0
,
2000
)
#
tdSql.checkData(0, 0, 2000)
tdSql
.
query
(
"show stables"
)
#
tdSql.query("show stables")
tdSql
.
checkData
(
1
,
4
,
20
)
#
tdSql.checkData(1, 4, 20)
# tdSql.query("select count(*) from stb01_0")
#
#
tdSql.query("select count(*) from stb01_0")
# tdSql.checkData(0, 0, 35)
#
#
tdSql.checkData(0, 0, 35)
tdSql
.
query
(
"select count(*) from stb1"
)
#
tdSql.query("select count(*) from stb1")
tdSql
.
checkData
(
0
,
0
,
700
)
#
tdSql.checkData(0, 0, 700)
# spend 2min30s for 3 testcases.
# spend 2min30s for 3 testcases.
# insert: drop and child_table_exists combination test
# insert: drop and child_table_exists combination test
...
@@ -134,10 +134,10 @@ class TDTestCase:
...
@@ -134,10 +134,10 @@ class TDTestCase:
# os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertColumnsAndTagNum4096-sml.json -y " % binPath)
# os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertColumnsAndTagNum4096-sml.json -y " % binPath)
# tdSql.query("select count(*) from db.stb0")
# tdSql.query("select count(*) from db.stb0")
# tdSql.checkData(0, 0, 10000)
# tdSql.checkData(0, 0, 10000)
tdSql
.
execute
(
"drop database if exists db"
)
#
tdSql.execute("drop database if exists db")
os
.
system
(
"%staosBenchmark -f tools/taosdemoAllTest/sml/insertInterlaceRowsLarge1M-sml.json -y "
%
binPath
)
#
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertInterlaceRowsLarge1M-sml.json -y " % binPath)
tdSql
.
query
(
"select count(*) from db.stb0"
)
#
tdSql.query("select count(*) from db.stb0")
tdSql
.
checkRows
(
0
)
#
tdSql.checkRows(0)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staosBenchmark -f tools/taosdemoAllTest/sml/insertColumnsNum0-sml.json -y "
%
binPath
)
os
.
system
(
"%staosBenchmark -f tools/taosdemoAllTest/sml/insertColumnsNum0-sml.json -y "
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录