Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
74fa1114
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
74fa1114
编写于
7月 27, 2021
作者:
W
wenzhouwww
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-5369]<test> change the nums of tables and insert rows!
上级
c63d6f4c
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
38 addition
and
40 deletion
+38
-40
tests/pytest/tools/taosdemoAllTest/taosdemoTestNanoDatabase.json
...ytest/tools/taosdemoAllTest/taosdemoTestNanoDatabase.json
+4
-4
tests/pytest/tools/taosdemoAllTest/taosdemoTestNanoDatabaseNow.json
...st/tools/taosdemoAllTest/taosdemoTestNanoDatabaseNow.json
+1
-1
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoInsert.py
...st/tools/taosdemoAllTest/taosdemoTestSupportNanoInsert.py
+16
-20
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoQuery.py
...est/tools/taosdemoAllTest/taosdemoTestSupportNanoQuery.py
+11
-11
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoQuerycsv.json
...ools/taosdemoAllTest/taosdemoTestSupportNanoQuerycsv.json
+1
-1
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoSubscribe.json
...ols/taosdemoAllTest/taosdemoTestSupportNanoSubscribe.json
+1
-1
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanosubscribe.py
...tools/taosdemoAllTest/taosdemoTestSupportNanosubscribe.py
+4
-2
未找到文件。
tests/pytest/tools/taosdemoAllTest/taosdemoTestNanoDatabase.json
浏览文件 @
74fa1114
...
...
@@ -35,13 +35,13 @@
"super_tables"
:
[{
"name"
:
"stb0"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
100
0
,
"childtable_count"
:
100
,
"childtable_prefix"
:
"tb0_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
20
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
100
00
,
"insert_rows"
:
100
,
"childtable_offset"
:
0
,
"multi_thread_write_one_tbl"
:
"no"
,
"insert_interval"
:
0
,
...
...
@@ -61,13 +61,13 @@
{
"name"
:
"stb1"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
100
0
,
"childtable_count"
:
100
,
"childtable_prefix"
:
"tb1_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
20
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
100
00
,
"insert_rows"
:
100
,
"childtable_offset"
:
0
,
"multi_thread_write_one_tbl"
:
"no"
,
"insert_interval"
:
0
,
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestNanoDatabaseNow.json
浏览文件 @
74fa1114
...
...
@@ -35,7 +35,7 @@
"super_tables"
:
[{
"name"
:
"stb0"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
100
0
,
"childtable_count"
:
100
,
"childtable_prefix"
:
"tb0_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
20
,
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoInsert.py
浏览文件 @
74fa1114
...
...
@@ -56,46 +56,47 @@ class TDTestCase:
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/taosdemoTestNanoDatabase.json -y "
%
binPath
)
tdSql
.
execute
(
"use nsdb"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
checkData
(
0
,
4
,
100
0
)
tdSql
.
checkData
(
0
,
4
,
100
)
tdSql
.
query
(
"select count (tbname) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
100
0
)
tdSql
.
checkData
(
0
,
0
,
100
)
tdSql
.
query
(
"select count(*) from tb0_0"
)
tdSql
.
checkData
(
0
,
0
,
100
00
)
tdSql
.
checkData
(
0
,
0
,
100
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
10000
000
)
tdSql
.
checkData
(
0
,
0
,
10000
)
tdSql
.
query
(
"describe stb0"
)
tdSql
.
checkDataType
(
9
,
1
,
"TIMESTAMP"
)
tdSql
.
query
(
"select last(ts) from stb0"
)
tdSql
.
getData
(
0
,
0
)
tdSql
.
checkData
(
0
,
0
,
"2021-07-01 00:00:00.990000000"
)
# check stable stb1 which is insert with disord
tdSql
.
query
(
"select count (tbname) from stb1"
)
tdSql
.
checkData
(
0
,
0
,
100
0
)
tdSql
.
checkData
(
0
,
0
,
100
)
tdSql
.
query
(
"select count(*) from tb1_0"
)
tdSql
.
checkData
(
0
,
0
,
100
00
)
tdSql
.
checkData
(
0
,
0
,
100
)
tdSql
.
query
(
"select count(*) from stb1"
)
tdSql
.
checkData
(
0
,
0
,
10000
000
)
tdSql
.
checkData
(
0
,
0
,
10000
)
# check c8 is an nano timestamp
tdSql
.
query
(
"describe stb1"
)
tdSql
.
checkDataType
(
9
,
1
,
"TIMESTAMP"
)
# check insert timestamp_step is nano_second
tdSql
.
query
(
"select last(ts) from stb1"
)
tdSql
.
checkData
(
0
,
0
,
"2021-07-01 00:0
1:39
.990000000"
)
tdSql
.
checkData
(
0
,
0
,
"2021-07-01 00:0
0:00
.990000000"
)
# insert data from now time
# check stable stb0
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/taosdemoTestNanoDatabaseNow.json -y "
%
binPath
)
tdSql
.
execute
(
"use nsdb2"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
checkData
(
0
,
4
,
100
0
)
tdSql
.
checkData
(
0
,
4
,
100
)
tdSql
.
query
(
"select count (tbname) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
100
0
)
tdSql
.
checkData
(
0
,
0
,
100
)
tdSql
.
query
(
"select count(*) from tb0_0"
)
tdSql
.
checkData
(
0
,
0
,
100
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
10000
0
)
tdSql
.
checkData
(
0
,
0
,
10000
)
# check c8 is an nano timestamp
tdSql
.
query
(
"describe stb0"
)
tdSql
.
checkDataType
(
9
,
1
,
"TIMESTAMP"
)
...
...
@@ -117,16 +118,11 @@ class TDTestCase:
os
.
system
(
"rm -rf ./insert_res.txt"
)
os
.
system
(
"rm -rf tools/taosdemoAllTest/taosdemoTestSupportNano*.py.sql"
)
# taosdemo test insert with command and parameter , detals show taosdemo --help
os
.
system
(
"%staosdemo -u root -P taosdata -p 6030 -h vm84 -a 1 -m pre -n 10 -T 20 -t 60 -o res.txt -y "
%
binPath
)
tdSql
.
query
(
"select count(*) from test.meters"
)
tdSql
.
checkData
(
0
,
0
,
600
)
os
.
system
(
"%staosdemo -u root -P taosdata -p 6030 -h vm84 -a 1 -m pre -n 10 -T 20 -t 60 -o res.txt -y "
%
binPath
)
# taosdemo test insert with command and parameter , detals show taosdemo --help
os
.
system
(
"%staosdemo -u root -P taosdata -p 6030 -a 1 -m pre -n 10 -T 20 -t 60 -o res.txt -y "
%
binPath
)
tdSql
.
query
(
"select count(*) from test.meters"
)
tdSql
.
checkData
(
0
,
0
,
600
)
# check taosdemo -s
sqls_ls
=
[
'drop database if exists nsdbsql;'
,
'create database nsdbsql precision "ns" keep 36 days 6 update 1;'
,
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoQuery.py
浏览文件 @
74fa1114
...
...
@@ -55,15 +55,15 @@ class TDTestCase:
# use where to filter
tdSql
.
query
(
"select count(*) from stb0 where ts>
\"
2021-07-01 00:0
1:00.000000000
\"
;
"
)
tdSql
.
checkData
(
0
,
0
,
3999
000
)
tdSql
.
query
(
"select count(*) from stb0 where ts>
\"
2021-07-01 00:0
1:00.000000000
\"
and ts <=
\"
2021-07-01 00:01:10.000000000
\"
;
"
)
tdSql
.
checkData
(
0
,
0
,
10000
00
)
tdSql
.
query
(
"select count(*) from stb0 where ts>
\"
2021-07-01 00:0
0:00.590000000
\"
"
)
tdSql
.
checkData
(
0
,
0
,
4
000
)
tdSql
.
query
(
"select count(*) from stb0 where ts>
\"
2021-07-01 00:0
0:00.000000000
\"
and ts <=
\"
2021-07-01 00:00:00.590000000
\"
"
)
tdSql
.
checkData
(
0
,
0
,
59
00
)
tdSql
.
query
(
"select count(*) from tb0_0 where ts>
\"
2021-07-01 00:0
1:00.00
0000000
\"
;"
)
tdSql
.
checkData
(
0
,
0
,
3999
)
tdSql
.
query
(
"select count(*) from tb0_0 where ts>
\"
2021-07-01 00:0
1:00.000000000
\"
and ts <=
\"
2021-07-01 00:01:10.000000000
\"
;
"
)
tdSql
.
checkData
(
0
,
0
,
1000
)
tdSql
.
query
(
"select count(*) from tb0_0 where ts>
\"
2021-07-01 00:0
0:00.59
0000000
\"
;"
)
tdSql
.
checkData
(
0
,
0
,
40
)
tdSql
.
query
(
"select count(*) from tb0_0 where ts>
\"
2021-07-01 00:0
0:00.000000000
\"
and ts <=
\"
2021-07-01 00:00:00.590000000
\"
"
)
tdSql
.
checkData
(
0
,
0
,
59
)
# select max min avg from special col
...
...
@@ -87,8 +87,8 @@ class TDTestCase:
print
(
"select avg(c1) from tb0_0 : "
,
tdSql
.
getData
(
0
,
0
))
tdSql
.
query
(
"select count(*) from stb0 group by tbname;"
)
tdSql
.
checkData
(
0
,
0
,
100
00
)
tdSql
.
checkData
(
10
0
,
0
,
100
00
)
tdSql
.
checkData
(
0
,
0
,
100
)
tdSql
.
checkData
(
10
,
0
,
1
00
)
# query : query above sqls by taosdemo and continuously
...
...
@@ -105,7 +105,7 @@ class TDTestCase:
tdSql
.
checkDataType
(
3
,
1
,
"TIMESTAMP"
)
tdSql
.
query
(
"select count(*) from stb0 where ts >
\"
2021-07-01 00:00:00.490000000
\"
"
)
tdSql
.
checkData
(
0
,
0
,
5000
)
tdSql
.
query
(
"select count(*) from stb0 where ts
>now -22
d-1h-3s"
)
tdSql
.
query
(
"select count(*) from stb0 where ts
<now -1
d-1h-3s"
)
tdSql
.
checkData
(
0
,
0
,
10000
)
tdSql
.
query
(
"select count(*) from stb0 where ts < 1626918583000000000"
)
tdSql
.
checkData
(
0
,
0
,
10000
)
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoQuerycsv.json
浏览文件 @
74fa1114
...
...
@@ -18,7 +18,7 @@
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select count(*) from stb0 where ts
>
now -22d-1h-3s ;"
,
"sql"
:
"select count(*) from stb0 where ts
<
now -22d-1h-3s ;"
,
"result"
:
"./query_res1.txt"
},
{
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoSubscribe.json
浏览文件 @
74fa1114
...
...
@@ -20,7 +20,7 @@
"result"
:
"./subscribe_res0.txt"
},
{
"sql"
:
"select * from stb0 where ts
> now -20
d-1h-3s ;"
,
"sql"
:
"select * from stb0 where ts
< now -2
d-1h-3s ;"
,
"result"
:
"./subscribe_res1.txt"
},
{
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanosubscribe.py
浏览文件 @
74fa1114
...
...
@@ -79,7 +79,7 @@ class TDTestCase:
# merge result files
sleep
(
2
0
)
sleep
(
1
0
)
os
.
system
(
"cat subscribe_res0.txt* > all_subscribe_res0.txt"
)
os
.
system
(
"cat subscribe_res1.txt* > all_subscribe_res1.txt"
)
os
.
system
(
"cat subscribe_res2.txt* > all_subscribe_res2.txt"
)
...
...
@@ -90,7 +90,7 @@ class TDTestCase:
self
.
assertCheck
(
"all_subscribe_res0.txt"
,
subTimes0
,
200
)
subTimes1
=
self
.
subTimes
(
"all_subscribe_res1.txt"
)
self
.
assertCheck
(
"all_subscribe_res1.txt"
,
subTimes1
,
0
)
self
.
assertCheck
(
"all_subscribe_res1.txt"
,
subTimes1
,
20
0
)
subTimes2
=
self
.
subTimes
(
"all_subscribe_res2.txt"
)
self
.
assertCheck
(
"all_subscribe_res2.txt"
,
subTimes2
,
200
)
...
...
@@ -103,6 +103,7 @@ class TDTestCase:
os
.
system
(
"cat subscribe_res0.txt* > all_subscribe_res0.txt"
)
subTimes0
=
self
.
subTimes
(
"all_subscribe_res0.txt"
)
print
(
"pass"
)
self
.
assertCheck
(
"all_subscribe_res0.txt"
,
subTimes0
,
202
)
...
...
@@ -112,6 +113,7 @@ class TDTestCase:
sleep
(
3
)
os
.
system
(
"rm -rf ./subscribe_res*"
)
os
.
system
(
"rm -rf ./all_subscribe*"
)
os
.
system
(
"rm -rf ./*.py.sql"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录