Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
90029476
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1193
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看板
提交
90029476
编写于
12月 08, 2021
作者:
C
Cary Xu
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into hotfix/TS-784-D
上级
28c644b7
13ac7117
变更
59
隐藏空白更改
内联
并排
Showing
59 changed file
with
245 addition
and
928 deletion
+245
-928
src/kit/taos-tools
src/kit/taos-tools
+1
-1
tests/pytest/alter/alter_cacheLastRow.py
tests/pytest/alter/alter_cacheLastRow.py
+1
-1
tests/pytest/client/change_time_1_1.py
tests/pytest/client/change_time_1_1.py
+2
-2
tests/pytest/client/change_time_1_2.py
tests/pytest/client/change_time_1_2.py
+1
-1
tests/pytest/cluster/TD-3693/multClient.py
tests/pytest/cluster/TD-3693/multClient.py
+2
-2
tests/pytest/compress/compressChangeVersion.py
tests/pytest/compress/compressChangeVersion.py
+1
-1
tests/pytest/dockerCluster/taosdemoWrapper.py
tests/pytest/dockerCluster/taosdemoWrapper.py
+2
-2
tests/pytest/fulltest.sh
tests/pytest/fulltest.sh
+21
-21
tests/pytest/import_merge/import_update_0.py
tests/pytest/import_merge/import_update_0.py
+1
-1
tests/pytest/import_merge/import_update_1.py
tests/pytest/import_merge/import_update_1.py
+1
-1
tests/pytest/import_merge/import_update_2.py
tests/pytest/import_merge/import_update_2.py
+1
-1
tests/pytest/manualTest/TD-5114/continueCreateDn.py
tests/pytest/manualTest/TD-5114/continueCreateDn.py
+1
-1
tests/pytest/manualTest/manual_alter_block.py
tests/pytest/manualTest/manual_alter_block.py
+2
-2
tests/pytest/manualTest/manual_alter_comp.py
tests/pytest/manualTest/manual_alter_comp.py
+3
-3
tests/pytest/perfbenchmark/bug3433.py
tests/pytest/perfbenchmark/bug3433.py
+1
-1
tests/pytest/perfbenchmark/bug3589.py
tests/pytest/perfbenchmark/bug3589.py
+1
-1
tests/pytest/query/nestedQuery/nestedQuery.py
tests/pytest/query/nestedQuery/nestedQuery.py
+2
-2
tests/pytest/query/nestedQuery/nestedQueryJson.py
tests/pytest/query/nestedQuery/nestedQueryJson.py
+1
-1
tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestInsertTime_step.py
...osdemoAllTest/NanoTestCase/taosdemoTestInsertTime_step.py
+3
-3
tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoInsert.py
...demoAllTest/NanoTestCase/taosdemoTestSupportNanoInsert.py
+5
-5
tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoQuery.py
...sdemoAllTest/NanoTestCase/taosdemoTestSupportNanoQuery.py
+5
-5
tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanosubscribe.py
...oAllTest/NanoTestCase/taosdemoTestSupportNanosubscribe.py
+2
-2
tests/pytest/tools/taosdemoAllTest/TD-10539/create_taosdemo.py
.../pytest/tools/taosdemoAllTest/TD-10539/create_taosdemo.py
+6
-6
tests/pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.py
...s/pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.py
+2
-2
tests/pytest/tools/taosdemoAllTest/TD-4985/query-limit-offset.py
...ytest/tools/taosdemoAllTest/TD-4985/query-limit-offset.py
+1
-1
tests/pytest/tools/taosdemoAllTest/TD-5213/insertSigcolumnsNum4096.py
.../tools/taosdemoAllTest/TD-5213/insertSigcolumnsNum4096.py
+5
-5
tests/pytest/tools/taosdemoAllTest/moredemo-insert-offset.py
tests/pytest/tools/taosdemoAllTest/moredemo-insert-offset.py
+4
-4
tests/pytest/tools/taosdemoAllTest/query-interrupt.py
tests/pytest/tools/taosdemoAllTest/query-interrupt.py
+2
-2
tests/pytest/tools/taosdemoAllTest/subscribeNoResult.py
tests/pytest/tools/taosdemoAllTest/subscribeNoResult.py
+1
-1
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertAllType.py
...pytest/tools/taosdemoAllTest/taosdemoTestInsertAllType.py
+3
-3
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertTime_step.py
...test/tools/taosdemoAllTest/taosdemoTestInsertTime_step.py
+3
-3
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
...ytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
+30
-30
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py
...st/tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py
+24
-24
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonStmt.py
...t/tools/taosdemoAllTest/taosdemoTestInsertWithJsonStmt.py
+28
-28
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonStmtPerformance.py
...sdemoAllTest/taosdemoTestInsertWithJsonStmtPerformance.py
+5
-5
tests/pytest/tools/taosdemoAllTest/taosdemoTestQueryWithJson.py
...pytest/tools/taosdemoAllTest/taosdemoTestQueryWithJson.py
+16
-16
tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py
...s/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py
+13
-13
tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJsonAsync.py
...est/tools/taosdemoAllTest/taosdemoTestSubWithJsonAsync.py
+5
-5
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoInsert.py
...st/tools/taosdemoAllTest/taosdemoTestSupportNanoInsert.py
+0
-168
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoQuery.json
...t/tools/taosdemoAllTest/taosdemoTestSupportNanoQuery.json
+0
-92
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoQuery.py
...est/tools/taosdemoAllTest/taosdemoTestSupportNanoQuery.py
+0
-157
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoQuerycsv.json
...ools/taosdemoAllTest/taosdemoTestSupportNanoQuerycsv.json
+0
-110
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoSubscribe.json
...ols/taosdemoAllTest/taosdemoTestSupportNanoSubscribe.json
+0
-32
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanosubscribe.py
...tools/taosdemoAllTest/taosdemoTestSupportNanosubscribe.py
+0
-124
tests/pytest/tools/taosdemoTest.py
tests/pytest/tools/taosdemoTest.py
+1
-1
tests/pytest/tools/taosdemoTestInterlace.py
tests/pytest/tools/taosdemoTestInterlace.py
+1
-1
tests/pytest/tools/taosdemoTestLimitOffset.py
tests/pytest/tools/taosdemoTestLimitOffset.py
+6
-6
tests/pytest/tools/taosdemoTestQuery.py
tests/pytest/tools/taosdemoTestQuery.py
+3
-3
tests/pytest/tools/taosdemoTestSampleData.py
tests/pytest/tools/taosdemoTestSampleData.py
+1
-1
tests/pytest/tools/taosdemoTestTblAlt.py
tests/pytest/tools/taosdemoTestTblAlt.py
+2
-2
tests/pytest/tools/taosdemoTestWithJson.py
tests/pytest/tools/taosdemoTestWithJson.py
+1
-1
tests/pytest/tools/taosdemoTestWithoutMetric.py
tests/pytest/tools/taosdemoTestWithoutMetric.py
+1
-1
tests/pytest/tools/taosdemoTestdatatype.py
tests/pytest/tools/taosdemoTestdatatype.py
+3
-3
tests/pytest/tsdb/tsdbComp.py
tests/pytest/tsdb/tsdbComp.py
+3
-3
tests/pytest/tsdb/tsdbCompCluster.py
tests/pytest/tsdb/tsdbCompCluster.py
+3
-3
tests/pytest/tsdb/tsdbCompClusterReplica2.py
tests/pytest/tsdb/tsdbCompClusterReplica2.py
+3
-3
tests/pytest/wal/sdbComp.py
tests/pytest/wal/sdbComp.py
+3
-3
tests/pytest/wal/sdbCompCluster.py
tests/pytest/wal/sdbCompCluster.py
+3
-3
tests/pytest/wal/sdbCompClusterReplica2.py
tests/pytest/wal/sdbCompClusterReplica2.py
+3
-3
未找到文件。
taos-tools
@
446c03da
比较
02837ce9
...
446c03da
Subproject commit
02837ce9e257aec65ba2995c6bebd72952f710a2
Subproject commit
446c03da6df8fe6675c6aba14b1d0766b56e1f08
tests/pytest/alter/alter_cacheLastRow.py
浏览文件 @
90029476
...
@@ -52,7 +52,7 @@ class TDTestCase:
...
@@ -52,7 +52,7 @@ class TDTestCase:
#write 5M rows into db, then restart to force the data move into disk.
#write 5M rows into db, then restart to force the data move into disk.
#create 500 tables
#create 500 tables
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insert_5M_rows.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insert_5M_rows.json -y "
%
binPath
)
tdDnodes
.
stop
(
1
)
tdDnodes
.
stop
(
1
)
tdDnodes
.
start
(
1
)
tdDnodes
.
start
(
1
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
...
...
tests/pytest/client/change_time_1_1.py
浏览文件 @
90029476
...
@@ -42,7 +42,7 @@ class TDTestCase:
...
@@ -42,7 +42,7 @@ class TDTestCase:
#11 data files should be generated
#11 data files should be generated
#vnode at TDinternal/community/sim/dnode1/data/vnode
#vnode at TDinternal/community/sim/dnode1/data/vnode
try
:
try
:
os
.
system
(
f
"
{
binPath
}
taos
demo
-f tools/taosdemoAllTest/manual_change_time_1_1_A.json"
)
os
.
system
(
f
"
{
binPath
}
taos
Benchmark
-f tools/taosdemoAllTest/manual_change_time_1_1_A.json"
)
commandArray
=
[
'ls'
,
'-l'
,
f
'
{
TDenginePath
}
/sim/dnode1/data/vnode/vnode2/tsdb/data'
]
commandArray
=
[
'ls'
,
'-l'
,
f
'
{
TDenginePath
}
/sim/dnode1/data/vnode/vnode2/tsdb/data'
]
result
=
subprocess
.
run
(
commandArray
,
stdout
=
subprocess
.
PIPE
).
stdout
.
decode
(
'utf-8'
)
result
=
subprocess
.
run
(
commandArray
,
stdout
=
subprocess
.
PIPE
).
stdout
.
decode
(
'utf-8'
)
except
BaseException
:
except
BaseException
:
...
@@ -59,7 +59,7 @@ class TDTestCase:
...
@@ -59,7 +59,7 @@ class TDTestCase:
#leaving 7 data files.
#leaving 7 data files.
try
:
try
:
os
.
system
(
'timedatectl set-time 2020-10-25'
)
os
.
system
(
'timedatectl set-time 2020-10-25'
)
os
.
system
(
f
"
{
binPath
}
taos
demo
-f tools/taosdemoAllTest/manual_change_time_1_1_B.json"
)
os
.
system
(
f
"
{
binPath
}
taos
Benchmark
-f tools/taosdemoAllTest/manual_change_time_1_1_B.json"
)
except
BaseException
:
except
BaseException
:
os
.
system
(
'sudo timedatectl set-ntp on'
)
os
.
system
(
'sudo timedatectl set-ntp on'
)
tdLog
.
sleep
(
10
)
tdLog
.
sleep
(
10
)
...
...
tests/pytest/client/change_time_1_2.py
浏览文件 @
90029476
...
@@ -41,7 +41,7 @@ class TDTestCase:
...
@@ -41,7 +41,7 @@ class TDTestCase:
#11 data files should be generated
#11 data files should be generated
#vnode at TDinternal/community/sim/dnode1/data/vnode
#vnode at TDinternal/community/sim/dnode1/data/vnode
try
:
try
:
os
.
system
(
f
"
{
binPath
}
taos
demo
-f tools/taosdemoAllTest/manual_change_time_1_1_A.json"
)
os
.
system
(
f
"
{
binPath
}
taos
Benchmark
-f tools/taosdemoAllTest/manual_change_time_1_1_A.json"
)
commandArray
=
[
'ls'
,
'-l'
,
f
'
{
TDenginePath
}
/sim/dnode1/data/vnode/vnode2/tsdb/data'
]
commandArray
=
[
'ls'
,
'-l'
,
f
'
{
TDenginePath
}
/sim/dnode1/data/vnode/vnode2/tsdb/data'
]
result
=
subprocess
.
run
(
commandArray
,
stdout
=
subprocess
.
PIPE
).
stdout
.
decode
(
'utf-8'
)
result
=
subprocess
.
run
(
commandArray
,
stdout
=
subprocess
.
PIPE
).
stdout
.
decode
(
'utf-8'
)
except
BaseException
:
except
BaseException
:
...
...
tests/pytest/cluster/TD-3693/multClient.py
浏览文件 @
90029476
...
@@ -51,9 +51,9 @@ class TDTestCase:
...
@@ -51,9 +51,9 @@ class TDTestCase:
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
# insert data to cluster'db
# insert data to cluster'db
os
.
system
(
"%staos
demo
-f cluster/TD-3693/insert1Data.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f cluster/TD-3693/insert1Data.json -y "
%
binPath
)
# multiple new and cloes connection with query data
# multiple new and cloes connection with query data
os
.
system
(
"%staos
demo
-f cluster/TD-3693/insert2Data.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f cluster/TD-3693/insert2Data.json -y "
%
binPath
)
os
.
system
(
"nohup %staosdemoMul -f cluster/TD-3693/queryCount.json -y & "
%
binPath
)
os
.
system
(
"nohup %staosdemoMul -f cluster/TD-3693/queryCount.json -y & "
%
binPath
)
...
...
tests/pytest/compress/compressChangeVersion.py
浏览文件 @
90029476
...
@@ -66,7 +66,7 @@ class TwoClients:
...
@@ -66,7 +66,7 @@ class TwoClients:
# create backgroud db and tb
# create backgroud db and tb
tdSql
.
execute
(
"drop database if exists db1"
)
tdSql
.
execute
(
"drop database if exists db1"
)
os
.
system
(
"%staos
demo
-f compress/insertDataDb1.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f compress/insertDataDb1.json -y "
%
binPath
)
# create foreground db and tb
# create foreground db and tb
tdSql
.
execute
(
"drop database if exists foredb"
)
tdSql
.
execute
(
"drop database if exists foredb"
)
tdSql
.
execute
(
"create database foredb"
)
tdSql
.
execute
(
"create database foredb"
)
...
...
tests/pytest/dockerCluster/taosdemoWrapper.py
浏览文件 @
90029476
...
@@ -35,11 +35,11 @@ class taosdemoWrapper:
...
@@ -35,11 +35,11 @@ class taosdemoWrapper:
def
run
(
self
):
def
run
(
self
):
if
self
.
metadata
is
None
:
if
self
.
metadata
is
None
:
os
.
system
(
"
taosdemo
-h %s -d %s -t %d -T %d -c %s -a %d -b %s -n %d -t %d -O %d -R %d -w %d -x -y"
os
.
system
(
"
%staosBenchmark
-h %s -d %s -t %d -T %d -c %s -a %d -b %s -n %d -t %d -O %d -R %d -w %d -x -y"
%
(
self
.
host
,
self
.
database
,
self
.
tables
,
self
.
threads
,
self
.
configDir
,
self
.
replica
,
self
.
columnType
,
%
(
self
.
host
,
self
.
database
,
self
.
tables
,
self
.
threads
,
self
.
configDir
,
self
.
replica
,
self
.
columnType
,
self
.
rowsPerTable
,
self
.
disorderRatio
,
self
.
disorderRange
,
self
.
charTypeLen
))
self
.
rowsPerTable
,
self
.
disorderRatio
,
self
.
disorderRange
,
self
.
charTypeLen
))
else
:
else
:
os
.
system
(
"
taosdemo
-f %s"
%
self
.
metadata
)
os
.
system
(
"
%staosBenchmark
-f %s"
%
self
.
metadata
)
parser
=
argparse
.
ArgumentParser
()
parser
=
argparse
.
ArgumentParser
()
...
...
tests/pytest/fulltest.sh
浏览文件 @
90029476
...
@@ -50,7 +50,7 @@ python3 ./test.py -f table/del_stable.py
...
@@ -50,7 +50,7 @@ python3 ./test.py -f table/del_stable.py
#stable
#stable
python3 ./test.py
-f
stable/insert.py
python3 ./test.py
-f
stable/insert.py
python3 test.py
-f
tools/taosdemoAllTest/taosdemoTestInsertWithJsonStmt.py
#
python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJsonStmt.py
# tag
# tag
python3 ./test.py
-f
tag_lite/filter.py
python3 ./test.py
-f
tag_lite/filter.py
...
@@ -165,13 +165,13 @@ python3 ./test.py -f update/merge_commit_data.py
...
@@ -165,13 +165,13 @@ python3 ./test.py -f update/merge_commit_data.py
python3 test.py
-f
tools/taosdumpTest.py
python3 test.py
-f
tools/taosdumpTest.py
python3 test.py
-f
tools/taosdumpTest2.py
python3 test.py
-f
tools/taosdumpTest2.py
python3 test.py
-f
tools/taosdemoTest.py
#
python3 test.py -f tools/taosdemoTest.py
python3 test.py
-f
tools/taosdemoTestWithoutMetric.py
#
python3 test.py -f tools/taosdemoTestWithoutMetric.py
python3 test.py
-f
tools/taosdemoTestWithJson.py
#
python3 test.py -f tools/taosdemoTestWithJson.py
python3 test.py
-f
tools/taosdemoTestLimitOffset.py
#
python3 test.py -f tools/taosdemoTestLimitOffset.py
python3 test.py
-f
tools/taosdemoTestTblAlt.py
#
python3 test.py -f tools/taosdemoTestTblAlt.py
python3 test.py
-f
tools/taosdemoTestSampleData.py
#
python3 test.py -f tools/taosdemoTestSampleData.py
python3 test.py
-f
tools/taosdemoTestInterlace.py
#
python3 test.py -f tools/taosdemoTestInterlace.py
# python3 test.py -f tools/taosdemoTestQuery.py
# python3 test.py -f tools/taosdemoTestQuery.py
# restful test for python
# restful test for python
...
@@ -179,10 +179,10 @@ python3 test.py -f tools/taosdemoTestInterlace.py
...
@@ -179,10 +179,10 @@ python3 test.py -f tools/taosdemoTestInterlace.py
# python3 test.py -f restful/restful_bind_db2.py
# python3 test.py -f restful/restful_bind_db2.py
# nano support
# nano support
python3 test.py
-f
tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoInsert.py
#
python3 test.py -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoInsert.py
python3 test.py
-f
tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoQuery.py
#
python3 test.py -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoQuery.py
python3 test.py
-f
tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanosubscribe.py
#
python3 test.py -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanosubscribe.py
python3 test.py
-f
tools/taosdemoAllTest/NanoTestCase/taosdemoTestInsertTime_step.py
#
python3 test.py -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestInsertTime_step.py
python3 test.py
-f
tools/taosdumpTestNanoSupport.py
python3 test.py
-f
tools/taosdumpTestNanoSupport.py
#
#
...
@@ -216,12 +216,12 @@ python3 ./test.py -f stable/query_after_reset.py
...
@@ -216,12 +216,12 @@ python3 ./test.py -f stable/query_after_reset.py
# perfbenchmark
# perfbenchmark
python3 ./test.py
-f
perfbenchmark/bug3433.py
python3 ./test.py
-f
perfbenchmark/bug3433.py
#python3 ./test.py -f perfbenchmark/bug3589.py
#python3 ./test.py -f perfbenchmark/bug3589.py
python3 ./test.py
-f
perfbenchmark/taosdemoInsert.py
#
python3 ./test.py -f perfbenchmark/taosdemoInsert.py
#taosdemo
#taosdemo
python3 test.py
-f
tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
#
python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
python3 test.py
-f
tools/taosdemoAllTest/taosdemoTestQueryWithJson.py
#
python3 test.py -f tools/taosdemoAllTest/taosdemoTestQueryWithJson.py
python3 test.py
-f
tools/taosdemoAllTest/taosdemoTestInsertAllType.py
#
python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertAllType.py
#query
#query
python3 test.py
-f
query/distinctOneColTb.py
python3 test.py
-f
query/distinctOneColTb.py
...
@@ -394,10 +394,10 @@ python3 ./test.py -f insert/insert_locking.py
...
@@ -394,10 +394,10 @@ python3 ./test.py -f insert/insert_locking.py
python3 ./test.py
-f
alter/alter_debugFlag.py
python3 ./test.py
-f
alter/alter_debugFlag.py
python3 ./test.py
-f
query/queryBetweenAnd.py
python3 ./test.py
-f
query/queryBetweenAnd.py
python3 ./test.py
-f
tag_lite/alter_tag.py
python3 ./test.py
-f
tag_lite/alter_tag.py
python3 test.py
-f
tools/taosdemoAllTest/TD-4985/query-limit-offset.py
#
python3 test.py -f tools/taosdemoAllTest/TD-4985/query-limit-offset.py
python3 test.py
-f
tools/taosdemoAllTest/TD-5213/insert4096columns_not_use_taosdemo.py
#
python3 test.py -f tools/taosdemoAllTest/TD-5213/insert4096columns_not_use_taosdemo.py
python3 test.py
-f
tools/taosdemoAllTest/TD-5213/insertSigcolumnsNum4096.py
#
python3 test.py -f tools/taosdemoAllTest/TD-5213/insertSigcolumnsNum4096.py
python3 test.py
-f
tools/taosdemoAllTest/TD-10539/create_taosdemo.py
#
python3 test.py -f tools/taosdemoAllTest/TD-10539/create_taosdemo.py
python3 ./test.py
-f
tag_lite/drop_auto_create.py
python3 ./test.py
-f
tag_lite/drop_auto_create.py
python3 test.py
-f
insert/insert_before_use_db.py
python3 test.py
-f
insert/insert_before_use_db.py
python3 test.py
-f
alter/alter_keep.py
python3 test.py
-f
alter/alter_keep.py
...
@@ -420,7 +420,7 @@ python3 ./test.py -f insert/verifyMemToDiskCrash.py
...
@@ -420,7 +420,7 @@ python3 ./test.py -f insert/verifyMemToDiskCrash.py
python3 ./test.py
-f
query/queryRegex.py
python3 ./test.py
-f
query/queryRegex.py
python3 ./test.py
-f
tools/taosdemoTestdatatype.py
#
python3 ./test.py -f tools/taosdemoTestdatatype.py
#python3 ./test.py -f insert/schemalessInsert.py
#python3 ./test.py -f insert/schemalessInsert.py
#python3 ./test.py -f insert/openTsdbTelnetLinesInsert.py
#python3 ./test.py -f insert/openTsdbTelnetLinesInsert.py
#python3 ./test.py -f insert/openTsdbJsonInsert.py
#python3 ./test.py -f insert/openTsdbJsonInsert.py
...
...
tests/pytest/import_merge/import_update_0.py
浏览文件 @
90029476
...
@@ -1055,7 +1055,7 @@ class TDTestCase:
...
@@ -1055,7 +1055,7 @@ class TDTestCase:
else
:
else
:
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
os
.
system
(
"%staos
demo
-N -d taosdemo -t 100 -n 100 -l 1000 -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-N -d taosdemo -t 100 -n 100 -l 1000 -y"
%
binPath
)
tdSql
.
execute
(
'''insert into table_2 values( %d , NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);'''
%
(
self
.
ts
-
200
))
tdSql
.
execute
(
'''insert into table_2 values( %d , NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);'''
%
(
self
.
ts
-
200
))
sql
=
'''select * from table_2 where ts = %d ;'''
%
(
self
.
ts
-
200
)
sql
=
'''select * from table_2 where ts = %d ;'''
%
(
self
.
ts
-
200
)
...
...
tests/pytest/import_merge/import_update_1.py
浏览文件 @
90029476
...
@@ -1055,7 +1055,7 @@ class TDTestCase:
...
@@ -1055,7 +1055,7 @@ class TDTestCase:
else
:
else
:
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
os
.
system
(
"%staos
demo
-N -d taosdemo -t 100 -n 100 -l 1000 -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-N -d taosdemo -t 100 -n 100 -l 1000 -y"
%
binPath
)
tdSql
.
execute
(
'''insert into table_2 values( %d , NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);'''
%
(
self
.
ts
-
200
))
tdSql
.
execute
(
'''insert into table_2 values( %d , NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);'''
%
(
self
.
ts
-
200
))
sql
=
'''select * from table_2 where ts = %d ;'''
%
(
self
.
ts
-
200
)
sql
=
'''select * from table_2 where ts = %d ;'''
%
(
self
.
ts
-
200
)
...
...
tests/pytest/import_merge/import_update_2.py
浏览文件 @
90029476
...
@@ -1181,7 +1181,7 @@ class TDTestCase:
...
@@ -1181,7 +1181,7 @@ class TDTestCase:
else
:
else
:
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
os
.
system
(
"%staos
demo
-N -d taosdemo -t 100 -n 100 -l 1000 -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-N -d taosdemo -t 100 -n 100 -l 1000 -y"
%
binPath
)
tdLog
.
info
(
"========== stable =========="
)
tdLog
.
info
(
"========== stable =========="
)
tdSql
.
execute
(
'''insert into table_2 values( %d , NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);'''
%
(
self
.
ts
-
200
))
tdSql
.
execute
(
'''insert into table_2 values( %d , NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);'''
%
(
self
.
ts
-
200
))
...
...
tests/pytest/manualTest/TD-5114/continueCreateDn.py
浏览文件 @
90029476
...
@@ -44,7 +44,7 @@ class TwoClients:
...
@@ -44,7 +44,7 @@ class TwoClients:
# insert data with c connector
# insert data with c connector
for
i
in
range
(
10
):
for
i
in
range
(
10
):
os
.
system
(
"
taosdemo
-f manualTest/TD-5114/insertDataDb3Replica2.json -y "
)
os
.
system
(
"
%staosBenchmark
-f manualTest/TD-5114/insertDataDb3Replica2.json -y "
)
# # check data correct
# # check data correct
tdSql
.
execute
(
"show databases"
)
tdSql
.
execute
(
"show databases"
)
tdSql
.
execute
(
"use db3"
)
tdSql
.
execute
(
"use db3"
)
...
...
tests/pytest/manualTest/manual_alter_block.py
浏览文件 @
90029476
...
@@ -55,7 +55,7 @@ class TDTestCase:
...
@@ -55,7 +55,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
9
,
3
)
tdSql
.
checkData
(
0
,
9
,
3
)
#run taosdemo to occupy all cache, need to manually check memory consumption
#run taosdemo to occupy all cache, need to manually check memory consumption
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/manual_block1_comp.json"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/manual_block1_comp.json"
%
binPath
)
input
(
"please check memory usage for taosd. After checking, press enter"
)
input
(
"please check memory usage for taosd. After checking, press enter"
)
#alter cache block to 8, then check alter
#alter cache block to 8, then check alter
...
@@ -64,7 +64,7 @@ class TDTestCase:
...
@@ -64,7 +64,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
9
,
8
)
tdSql
.
checkData
(
0
,
9
,
8
)
#run taosdemo to occupy all cache, need to manually check memory consumption
#run taosdemo to occupy all cache, need to manually check memory consumption
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/manual_block2.json"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/manual_block2.json"
%
binPath
)
input
(
"please check memory usage for taosd. After checking, press enter"
)
input
(
"please check memory usage for taosd. After checking, press enter"
)
##expected result the peak memory consumption should increase by around 80MB = 5 blocks of cache
##expected result the peak memory consumption should increase by around 80MB = 5 blocks of cache
...
...
tests/pytest/manualTest/manual_alter_comp.py
浏览文件 @
90029476
...
@@ -74,7 +74,7 @@ class TDTestCase:
...
@@ -74,7 +74,7 @@ class TDTestCase:
tdSql
.
query
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
tdSql
.
execute
(
'alter database db blocks 3'
)
# minimize the data in cache
tdSql
.
execute
(
'alter database db blocks 3'
)
# minimize the data in cache
tdSql
.
checkData
(
0
,
14
,
2
)
tdSql
.
checkData
(
0
,
14
,
2
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/manual_block1_comp.json"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/manual_block1_comp.json"
%
binPath
)
print
(
"default location is at /home/bryan/Documents/Github/TDengine/sim/dnode1/data/vnode"
)
print
(
"default location is at /home/bryan/Documents/Github/TDengine/sim/dnode1/data/vnode"
)
print
(
'comp = 2'
)
print
(
'comp = 2'
)
input
(
"please check disk usage for taosd. After checking, press enter"
)
input
(
"please check disk usage for taosd. After checking, press enter"
)
...
@@ -91,7 +91,7 @@ class TDTestCase:
...
@@ -91,7 +91,7 @@ class TDTestCase:
tdSql
.
execute
(
'alter database db comp 0'
)
tdSql
.
execute
(
'alter database db comp 0'
)
tdSql
.
query
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
tdSql
.
checkData
(
0
,
14
,
0
)
tdSql
.
checkData
(
0
,
14
,
0
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/manual_block1_comp.json"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/manual_block1_comp.json"
%
binPath
)
print
(
"default location is at /home/bryan/Documents/Github/TDengine/sim/dnode1/data"
)
print
(
"default location is at /home/bryan/Documents/Github/TDengine/sim/dnode1/data"
)
print
(
'comp = 0'
)
print
(
'comp = 0'
)
input
(
"please check disk usage for taosd. After checking, press enter"
)
input
(
"please check disk usage for taosd. After checking, press enter"
)
...
@@ -108,7 +108,7 @@ class TDTestCase:
...
@@ -108,7 +108,7 @@ class TDTestCase:
tdSql
.
execute
(
'alter database db comp 1'
)
tdSql
.
execute
(
'alter database db comp 1'
)
tdSql
.
query
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
tdSql
.
checkData
(
0
,
14
,
1
)
tdSql
.
checkData
(
0
,
14
,
1
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/manual_block1_comp.json"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/manual_block1_comp.json"
%
binPath
)
print
(
"default location is at /home/bryan/Documents/Github/TDengine/sim/dnode1/data"
)
print
(
"default location is at /home/bryan/Documents/Github/TDengine/sim/dnode1/data"
)
print
(
'comp = 1'
)
print
(
'comp = 1'
)
input
(
"please check disk usage for taosd. After checking, press enter"
)
input
(
"please check disk usage for taosd. After checking, press enter"
)
...
...
tests/pytest/perfbenchmark/bug3433.py
浏览文件 @
90029476
...
@@ -211,7 +211,7 @@ class TDTestCase:
...
@@ -211,7 +211,7 @@ class TDTestCase:
tdLog
.
info
(
f
"taosd found in
{
buildPath
}
"
)
tdLog
.
info
(
f
"taosd found in
{
buildPath
}
"
)
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
create_table_cmd
=
f
"
{
binPath
}
taos
demo
-f
{
filepath
}
> /dev/null 2>&1"
create_table_cmd
=
f
"
{
binPath
}
taos
Benchmark
-f
{
filepath
}
> /dev/null 2>&1"
_
=
subprocess
.
check_output
(
create_table_cmd
,
shell
=
True
).
decode
(
"utf-8"
)
_
=
subprocess
.
check_output
(
create_table_cmd
,
shell
=
True
).
decode
(
"utf-8"
)
def
droptmpfile
(
self
):
def
droptmpfile
(
self
):
...
...
tests/pytest/perfbenchmark/bug3589.py
浏览文件 @
90029476
...
@@ -89,7 +89,7 @@ class TDTestCase:
...
@@ -89,7 +89,7 @@ class TDTestCase:
tdLog
.
info
(
f
"taosd found in
{
buildPath
}
"
)
tdLog
.
info
(
f
"taosd found in
{
buildPath
}
"
)
binPath
=
buildPath
+
"/debug/build/bin/"
binPath
=
buildPath
+
"/debug/build/bin/"
query_table_cmd
=
f
"yes |
{
binPath
}
taos
demo
-f
{
filepath
}
"
query_table_cmd
=
f
"yes |
{
binPath
}
taos
Benchmark
-f
{
filepath
}
"
_
=
subprocess
.
check_output
(
query_table_cmd
,
shell
=
True
).
decode
(
"utf-8"
)
_
=
subprocess
.
check_output
(
query_table_cmd
,
shell
=
True
).
decode
(
"utf-8"
)
def
checkqueryresult
(
self
,
expectrows
):
def
checkqueryresult
(
self
,
expectrows
):
...
...
tests/pytest/query/nestedQuery/nestedQuery.py
浏览文件 @
90029476
...
@@ -2220,7 +2220,7 @@ class TDTestCase:
...
@@ -2220,7 +2220,7 @@ class TDTestCase:
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
# regualr-table
# regualr-table
os
.
system
(
"%staos
demo
-N -d regular -t 2 -n 1000 -l 4095 -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-N -d regular -t 2 -n 1000 -l 4095 -y"
%
binPath
)
tdSql
.
execute
(
"use regular"
)
tdSql
.
execute
(
"use regular"
)
tdSql
.
query
(
"select * from d0;"
)
tdSql
.
query
(
"select * from d0;"
)
tdSql
.
checkCols
(
4096
)
tdSql
.
checkCols
(
4096
)
...
@@ -2281,7 +2281,7 @@ class TDTestCase:
...
@@ -2281,7 +2281,7 @@ class TDTestCase:
tdSql
.
checkRows
(
1000
)
tdSql
.
checkRows
(
1000
)
#stable
#stable
os
.
system
(
"%staos
demo
-d super -t 2 -n 1000 -l 4093 -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-d super -t 2 -n 1000 -l 4093 -y"
%
binPath
)
tdSql
.
execute
(
"use super"
)
tdSql
.
execute
(
"use super"
)
tdSql
.
query
(
"select * from meters;"
)
tdSql
.
query
(
"select * from meters;"
)
tdSql
.
checkCols
(
4096
)
tdSql
.
checkCols
(
4096
)
...
...
tests/pytest/query/nestedQuery/nestedQueryJson.py
浏览文件 @
90029476
...
@@ -49,7 +49,7 @@ class TDTestCase:
...
@@ -49,7 +49,7 @@ class TDTestCase:
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
# insert: create one or mutiple tables per sql and insert multiple rows per sql
# insert: create one or mutiple tables per sql and insert multiple rows per sql
os
.
system
(
"%staos
demo
-f query/nestedQuery/insertData.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f query/nestedQuery/insertData.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
,
1000
)
tdSql
.
checkData
(
0
,
0
,
1000
)
...
...
tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestInsertTime_step.py
浏览文件 @
90029476
...
@@ -51,7 +51,7 @@ class TDTestCase:
...
@@ -51,7 +51,7 @@ class TDTestCase:
# insert: create one or mutiple tables per sql and insert multiple rows per sql
# insert: create one or mutiple tables per sql and insert multiple rows per sql
# check the params of taosdemo about time_step is nano
# check the params of taosdemo about time_step is nano
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/NanoTestCase/taosdemoInsertNanoDB.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/NanoTestCase/taosdemoInsertNanoDB.json -y "
%
binPath
)
tdSql
.
execute
(
"use testdb1"
)
tdSql
.
execute
(
"use testdb1"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
checkData
(
0
,
4
,
100
)
tdSql
.
checkData
(
0
,
4
,
100
)
...
@@ -68,7 +68,7 @@ class TDTestCase:
...
@@ -68,7 +68,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
"2021-07-01 00:00:00.000099000"
)
tdSql
.
checkData
(
0
,
0
,
"2021-07-01 00:00:00.000099000"
)
# check the params of taosdemo about time_step is us
# check the params of taosdemo about time_step is us
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/NanoTestCase/taosdemoInsertUSDB.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/NanoTestCase/taosdemoInsertUSDB.json -y "
%
binPath
)
tdSql
.
execute
(
"use testdb2"
)
tdSql
.
execute
(
"use testdb2"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
checkData
(
0
,
4
,
100
)
tdSql
.
checkData
(
0
,
4
,
100
)
...
@@ -85,7 +85,7 @@ class TDTestCase:
...
@@ -85,7 +85,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
"2021-07-01 00:00:00.099000"
)
tdSql
.
checkData
(
0
,
0
,
"2021-07-01 00:00:00.099000"
)
# check the params of taosdemo about time_step is ms
# check the params of taosdemo about time_step is ms
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/NanoTestCase/taosdemoInsertMSDB.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/NanoTestCase/taosdemoInsertMSDB.json -y "
%
binPath
)
tdSql
.
execute
(
"use testdb3"
)
tdSql
.
execute
(
"use testdb3"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
checkData
(
0
,
4
,
100
)
tdSql
.
checkData
(
0
,
4
,
100
)
...
...
tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoInsert.py
浏览文件 @
90029476
...
@@ -53,7 +53,7 @@ class TDTestCase:
...
@@ -53,7 +53,7 @@ class TDTestCase:
# check stable stb0
# check stable stb0
os
.
system
(
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabase.json -y "
%
"%staos
Benchmark
-f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabase.json -y "
%
binPath
)
binPath
)
tdSql
.
execute
(
"use nsdb"
)
tdSql
.
execute
(
"use nsdb"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
query
(
"show stables"
)
...
@@ -88,7 +88,7 @@ class TDTestCase:
...
@@ -88,7 +88,7 @@ class TDTestCase:
# check stable stb0
# check stable stb0
os
.
system
(
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabaseNow.json -y "
%
"%staos
Benchmark
-f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabaseNow.json -y "
%
binPath
)
binPath
)
tdSql
.
execute
(
"use nsdb2"
)
tdSql
.
execute
(
"use nsdb2"
)
...
@@ -108,7 +108,7 @@ class TDTestCase:
...
@@ -108,7 +108,7 @@ class TDTestCase:
# cols
# cols
os
.
system
(
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabasecsv.json -y "
%
"%staos
Benchmark
-f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabasecsv.json -y "
%
binPath
)
binPath
)
tdSql
.
execute
(
"use nsdbcsv"
)
tdSql
.
execute
(
"use nsdbcsv"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
query
(
"show stables"
)
...
@@ -130,7 +130,7 @@ class TDTestCase:
...
@@ -130,7 +130,7 @@ class TDTestCase:
# taosdemo test insert with command and parameter , detals show
# taosdemo test insert with command and parameter , detals show
# taosdemo --help
# taosdemo --help
os
.
system
(
os
.
system
(
"%staos
demo
-u root -ptaosdata -P 6030 -a 1 -m pre -n 10 -T 20 -t 60 -o res.txt -y "
%
"%staos
Benchmark
-u root -ptaosdata -P 6030 -a 1 -m pre -n 10 -T 20 -t 60 -o res.txt -y "
%
binPath
)
binPath
)
tdSql
.
query
(
"select count(*) from test.meters"
)
tdSql
.
query
(
"select count(*) from test.meters"
)
tdSql
.
checkData
(
0
,
0
,
600
)
tdSql
.
checkData
(
0
,
0
,
600
)
...
@@ -152,7 +152,7 @@ class TDTestCase:
...
@@ -152,7 +152,7 @@ class TDTestCase:
sleep
(
10
)
sleep
(
10
)
os
.
system
(
"%staos
demo
-s taosdemoTestNanoCreateDB.sql -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-s taosdemoTestNanoCreateDB.sql -y "
%
binPath
)
tdSql
.
query
(
"select count(*) from nsdbsql.meters"
)
tdSql
.
query
(
"select count(*) from nsdbsql.meters"
)
tdSql
.
checkData
(
0
,
0
,
2
)
tdSql
.
checkData
(
0
,
0
,
2
)
...
...
tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoQuery.py
浏览文件 @
90029476
###################################################################
''
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
...
@@ -49,7 +49,7 @@ class TDTestCase:
...
@@ -49,7 +49,7 @@ class TDTestCase:
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
# query: query test for nanoSecond with where and max min groupby order
# query: query test for nanoSecond with where and max min groupby order
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabase.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabase.json -y "
%
binPath
)
tdSql
.
execute
(
"use nsdb"
)
tdSql
.
execute
(
"use nsdb"
)
...
@@ -92,10 +92,10 @@ class TDTestCase:
...
@@ -92,10 +92,10 @@ class TDTestCase:
# query : query above sqls by taosdemo and continuously
# query : query above sqls by taosdemo and continuously
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoQuery.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoQuery.json -y "
%
binPath
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabasecsv.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabasecsv.json -y "
%
binPath
)
tdSql
.
execute
(
"use nsdbcsv"
)
tdSql
.
execute
(
"use nsdbcsv"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
checkData
(
0
,
4
,
100
)
tdSql
.
checkData
(
0
,
4
,
100
)
...
@@ -140,7 +140,7 @@ class TDTestCase:
...
@@ -140,7 +140,7 @@ class TDTestCase:
tdSql
.
checkRows
(
10
)
tdSql
.
checkRows
(
10
)
# query : query above sqls by taosdemo and continuously
# query : query above sqls by taosdemo and continuously
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoQuerycsv.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoQuerycsv.json -y "
%
binPath
)
os
.
system
(
"rm -rf ./query_res*.txt*"
)
os
.
system
(
"rm -rf ./query_res*.txt*"
)
os
.
system
(
"rm -rf tools/taosdemoAllTest/NanoTestCase/*.py.sql"
)
os
.
system
(
"rm -rf tools/taosdemoAllTest/NanoTestCase/*.py.sql"
)
...
...
tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanosubscribe.py
浏览文件 @
90029476
...
@@ -73,8 +73,8 @@ class TDTestCase:
...
@@ -73,8 +73,8 @@ class TDTestCase:
# insert data
# insert data
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabaseInsertForSub.json"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabaseInsertForSub.json"
%
binPath
)
os
.
system
(
"nohup %staos
demo
-f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoSubscribe.json &"
%
binPath
)
os
.
system
(
"nohup %staos
Benchmark
-f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoSubscribe.json &"
%
binPath
)
query_pid
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep "taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoSubscribe.json" |grep -v "grep"|awk
\'
{print $2}
\'
'
)[
1
])
query_pid
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep "taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoSubscribe.json" |grep -v "grep"|awk
\'
{print $2}
\'
'
)[
1
])
...
...
tests/pytest/tools/taosdemoAllTest/TD-10539/create_taosdemo.py
浏览文件 @
90029476
...
@@ -56,7 +56,7 @@ class TDTestCase:
...
@@ -56,7 +56,7 @@ class TDTestCase:
#print("==============taosdemo,#create stable,table; insert table; show table; select table; drop table")
#print("==============taosdemo,#create stable,table; insert table; show table; select table; drop table")
self
.
tsdemo
=
"tsdemo~!.@#$%^*[]-_=+{,?.}"
self
.
tsdemo
=
"tsdemo~!.@#$%^*[]-_=+{,?.}"
#this escape character is not support in shell . include & () <> | /
#this escape character is not support in shell . include & () <> | /
os
.
system
(
"%staos
demo
-d test -E -m %s -t 10 -n 100 -l 10 -y "
%
(
binPath
,
self
.
tsdemo
))
os
.
system
(
"%staos
Benchmark
-d test -E -m %s -t 10 -n 100 -l 10 -y "
%
(
binPath
,
self
.
tsdemo
))
tdSql
.
execute
(
"use test ;"
)
tdSql
.
execute
(
"use test ;"
)
tdSql
.
query
(
"select count(*) from meters"
)
tdSql
.
query
(
"select count(*) from meters"
)
tdSql
.
checkData
(
0
,
0
,
1000
)
tdSql
.
checkData
(
0
,
0
,
1000
)
...
@@ -91,14 +91,14 @@ class TDTestCase:
...
@@ -91,14 +91,14 @@ class TDTestCase:
tdSql
.
error
(
"select * from test.`%s2` ; "
%
self
.
tsdemo
)
tdSql
.
error
(
"select * from test.`%s2` ; "
%
self
.
tsdemo
)
# Exception
# Exception
os
.
system
(
"%staos
demo
-d test -m %s -t 10 -n 100 -l 10 -y "
%
(
binPath
,
self
.
tsdemo
))
os
.
system
(
"%staos
Benchmark
-d test -m %s -t 10 -n 100 -l 10 -y "
%
(
binPath
,
self
.
tsdemo
))
tdSql
.
query
(
"show test.tables "
)
tdSql
.
query
(
"show test.tables "
)
tdSql
.
checkRows
(
0
)
tdSql
.
checkRows
(
0
)
#print("==============taosdemo,#create regular table; insert table; show table; select table; drop table")
#print("==============taosdemo,#create regular table; insert table; show table; select table; drop table")
self
.
tsdemo
=
"tsdemo~!.@#$%^*[]-_=+{,?.}"
self
.
tsdemo
=
"tsdemo~!.@#$%^*[]-_=+{,?.}"
#this escape character is not support in shell . include & () <> | /
#this escape character is not support in shell . include & () <> | /
os
.
system
(
"%staos
demo
-N -E -m %s -t 10 -n 100 -l 10 -y "
%
(
binPath
,
self
.
tsdemo
))
os
.
system
(
"%staos
Benchmark
-N -E -m %s -t 10 -n 100 -l 10 -y "
%
(
binPath
,
self
.
tsdemo
))
tdSql
.
execute
(
"use test ;"
)
tdSql
.
execute
(
"use test ;"
)
tdSql
.
query
(
"select count(*) from `%s1`"
%
self
.
tsdemo
)
tdSql
.
query
(
"select count(*) from `%s1`"
%
self
.
tsdemo
)
tdSql
.
checkData
(
0
,
0
,
100
)
tdSql
.
checkData
(
0
,
0
,
100
)
...
@@ -125,13 +125,13 @@ class TDTestCase:
...
@@ -125,13 +125,13 @@ class TDTestCase:
tdSql
.
checkRows
(
9
)
tdSql
.
checkRows
(
9
)
# Exception
# Exception
os
.
system
(
"%staos
demo
-N -m %s -t 10 -n 100 -l 10 -y "
%
(
binPath
,
self
.
tsdemo
))
os
.
system
(
"%staos
Benchmark
-N -m %s -t 10 -n 100 -l 10 -y "
%
(
binPath
,
self
.
tsdemo
))
tdSql
.
query
(
"show test.tables "
)
tdSql
.
query
(
"show test.tables "
)
tdSql
.
checkRows
(
0
)
tdSql
.
checkRows
(
0
)
#print("==============taosdemo——json_yes,#create stable,table; insert table; show table; select table; drop table")
#print("==============taosdemo——json_yes,#create stable,table; insert table; show table; select table; drop table")
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/TD-10539/create_taosdemo_yes.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/TD-10539/create_taosdemo_yes.json -y "
%
binPath
)
tdSql
.
execute
(
"use dbyes"
)
tdSql
.
execute
(
"use dbyes"
)
self
.
tsdemo_stable
=
"tsdemo_stable~!.@#$%^*[]-_=+{,?.}"
self
.
tsdemo_stable
=
"tsdemo_stable~!.@#$%^*[]-_=+{,?.}"
...
@@ -171,7 +171,7 @@ class TDTestCase:
...
@@ -171,7 +171,7 @@ class TDTestCase:
#print("==============taosdemo——json_no,#create stable,table; insert table; show table; select table; drop table")
#print("==============taosdemo——json_no,#create stable,table; insert table; show table; select table; drop table")
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/TD-10539/create_taosdemo_no.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/TD-10539/create_taosdemo_no.json -y "
%
binPath
)
tdSql
.
query
(
"show dbno.tables;"
)
tdSql
.
query
(
"show dbno.tables;"
)
tdSql
.
checkRows
(
0
)
tdSql
.
checkRows
(
0
)
...
...
tests/pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.py
浏览文件 @
90029476
...
@@ -52,13 +52,13 @@ class TDTestCase:
...
@@ -52,13 +52,13 @@ class TDTestCase:
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
# # insert 1000w rows in stb0
# # insert 1000w rows in stb0
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/TD-3453/query-interrupt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/TD-3453/query-interrupt.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
,
60
)
tdSql
.
checkData
(
0
,
0
,
60
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
6000000
)
tdSql
.
checkData
(
0
,
0
,
6000000
)
os
.
system
(
'%staos
demo
-f tools/taosdemoAllTest/TD-3453/queryall.json -y & '
%
binPath
)
os
.
system
(
'%staos
Benchmark
-f tools/taosdemoAllTest/TD-3453/queryall.json -y & '
%
binPath
)
time
.
sleep
(
2
)
time
.
sleep
(
2
)
query_pid
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep "TD-3453/queryall.json" |grep -v "grep"|awk
\'
{print $2}
\'
'
)[
1
])
query_pid
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep "TD-3453/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
])
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
])
...
...
tests/pytest/tools/taosdemoAllTest/TD-4985/query-limit-offset.py
浏览文件 @
90029476
...
@@ -55,7 +55,7 @@ class TDTestCase:
...
@@ -55,7 +55,7 @@ class TDTestCase:
# insert: create one or mutiple tables per sql and insert multiple rows per sql
# insert: create one or mutiple tables per sql and insert multiple rows per sql
# test case for https://jira.taosdata.com:18080/browse/TD-4985
# test case for https://jira.taosdata.com:18080/browse/TD-4985
os
.
system
(
"rm -rf tools/taosdemoAllTest/TD-4985/query-limit-offset.py.sql"
)
os
.
system
(
"rm -rf tools/taosdemoAllTest/TD-4985/query-limit-offset.py.sql"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/TD-4985/query-limit-offset.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/TD-4985/query-limit-offset.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
,
10000
)
tdSql
.
checkData
(
0
,
0
,
10000
)
...
...
tests/pytest/tools/taosdemoAllTest/TD-5213/insertSigcolumnsNum4096.py
浏览文件 @
90029476
...
@@ -52,7 +52,7 @@ class TDTestCase:
...
@@ -52,7 +52,7 @@ class TDTestCase:
#-N:regular table -d:database name -t:table num -n:rows num per table -l:col num -y:force
#-N:regular table -d:database name -t:table num -n:rows num per table -l:col num -y:force
#regular old && new
#regular old && new
startTime
=
time
.
time
()
startTime
=
time
.
time
()
os
.
system
(
"%staos
demo
-N -d regular_old -t 1 -n 10 -l 1023 -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-N -d regular_old -t 1 -n 10 -l 1023 -y"
%
binPath
)
tdSql
.
execute
(
"use regular_old"
)
tdSql
.
execute
(
"use regular_old"
)
tdSql
.
query
(
"show tables;"
)
tdSql
.
query
(
"show tables;"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
...
@@ -61,7 +61,7 @@ class TDTestCase:
...
@@ -61,7 +61,7 @@ class TDTestCase:
tdSql
.
query
(
"describe d0;"
)
tdSql
.
query
(
"describe d0;"
)
tdSql
.
checkRows
(
1024
)
tdSql
.
checkRows
(
1024
)
os
.
system
(
"%staos
demo
-N -d regular_new -t 1 -n 10 -l 4095 -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-N -d regular_new -t 1 -n 10 -l 4095 -y"
%
binPath
)
tdSql
.
execute
(
"use regular_new"
)
tdSql
.
execute
(
"use regular_new"
)
tdSql
.
query
(
"show tables;"
)
tdSql
.
query
(
"show tables;"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
...
@@ -71,7 +71,7 @@ class TDTestCase:
...
@@ -71,7 +71,7 @@ class TDTestCase:
tdSql
.
checkRows
(
4096
)
tdSql
.
checkRows
(
4096
)
#super table -d:database name -t:table num -n:rows num per table -l:col num -y:force
#super table -d:database name -t:table num -n:rows num per table -l:col num -y:force
os
.
system
(
"%staos
demo
-d super_old -t 1 -n 10 -l 1021 -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-d super_old -t 1 -n 10 -l 1021 -y"
%
binPath
)
tdSql
.
execute
(
"use super_old"
)
tdSql
.
execute
(
"use super_old"
)
tdSql
.
query
(
"show tables;"
)
tdSql
.
query
(
"show tables;"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
...
@@ -84,7 +84,7 @@ class TDTestCase:
...
@@ -84,7 +84,7 @@ class TDTestCase:
tdSql
.
query
(
"describe d0;"
)
tdSql
.
query
(
"describe d0;"
)
tdSql
.
checkRows
(
1024
)
tdSql
.
checkRows
(
1024
)
os
.
system
(
"%staos
demo
-d super_new -t 1 -n 10 -l 4093 -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-d super_new -t 1 -n 10 -l 4093 -y"
%
binPath
)
tdSql
.
execute
(
"use super_new"
)
tdSql
.
execute
(
"use super_new"
)
tdSql
.
query
(
"show tables;"
)
tdSql
.
query
(
"show tables;"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
...
@@ -104,7 +104,7 @@ class TDTestCase:
...
@@ -104,7 +104,7 @@ class TDTestCase:
# insert: create one or mutiple tables per sql and insert multiple rows per sql
# insert: create one or mutiple tables per sql and insert multiple rows per sql
# test case for https://jira.taosdata.com:18080/browse/TD-5213
# test case for https://jira.taosdata.com:18080/browse/TD-5213
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/TD-5213/insertSigcolumnsNum4096.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/TD-5213/insertSigcolumnsNum4096.json -y "
%
binPath
)
tdSql
.
execute
(
"use json"
)
tdSql
.
execute
(
"use json"
)
tdSql
.
query
(
"select count (tbname) from stb_old"
)
tdSql
.
query
(
"select count (tbname) from stb_old"
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
...
...
tests/pytest/tools/taosdemoAllTest/moredemo-insert-offset.py
浏览文件 @
90029476
...
@@ -50,10 +50,10 @@ class TDTestCase:
...
@@ -50,10 +50,10 @@ class TDTestCase:
# insert: drop and child_table_exists combination test
# insert: drop and child_table_exists combination test
# insert: using parament "childtable_offset and childtable_limit" to control table'offset point and offset
# insert: using parament "childtable_offset and childtable_limit" to control table'offset point and offset
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/moredemo-offset-newdb.json"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/moredemo-offset-newdb.json"
%
binPath
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/moredemo-offset-limit1.json & "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/moredemo-offset-limit1.json & "
%
binPath
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/moredemo-offset-limit94.json & "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/moredemo-offset-limit94.json & "
%
binPath
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/moredemo-offset-limit5.json & "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/moredemo-offset-limit5.json & "
%
binPath
)
sleep
(
15
)
sleep
(
15
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
query
(
"select count(*) from stb0"
)
...
...
tests/pytest/tools/taosdemoAllTest/query-interrupt.py
浏览文件 @
90029476
...
@@ -52,13 +52,13 @@ class TDTestCase:
...
@@ -52,13 +52,13 @@ class TDTestCase:
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
# # insert 1000w rows in stb0
# # insert 1000w rows in stb0
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/query-interrupt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/query-interrupt.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
,
60
)
tdSql
.
checkData
(
0
,
0
,
60
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
6000000
)
tdSql
.
checkData
(
0
,
0
,
6000000
)
os
.
system
(
'%staos
demo
-f tools/taosdemoAllTest/queryall.json -y & '
%
binPath
)
os
.
system
(
'%staos
Benchmark
-f tools/taosdemoAllTest/queryall.json -y & '
%
binPath
)
time
.
sleep
(
2
)
time
.
sleep
(
2
)
query_pid
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep "taosdemoAllTest/queryall.json" |grep -v "grep"|awk
\'
{print $2}
\'
'
)[
1
])
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
])
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
])
...
...
tests/pytest/tools/taosdemoAllTest/subscribeNoResult.py
浏览文件 @
90029476
...
@@ -68,7 +68,7 @@ class TDTestCase:
...
@@ -68,7 +68,7 @@ class TDTestCase:
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/sub_no_result.json -g 2>&1 | tee sub_no_result.log"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sub_no_result.json -g 2>&1 | tee sub_no_result.log"
%
binPath
)
test_line
=
int
(
self
.
execCmdAndGetOutput
(
"cat sub_no_result.log | wc -l"
))
test_line
=
int
(
self
.
execCmdAndGetOutput
(
"cat sub_no_result.log | wc -l"
))
if
(
test_line
<
1100024
):
if
(
test_line
<
1100024
):
tdLog
.
exit
(
"failed test subscribeNoResult: %d != expected(1100024)"
%
test_line
)
tdLog
.
exit
(
"failed test subscribeNoResult: %d != expected(1100024)"
%
test_line
)
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertAllType.py
浏览文件 @
90029476
...
@@ -49,7 +49,7 @@ class TDTestCase:
...
@@ -49,7 +49,7 @@ class TDTestCase:
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
# insert: create one or mutiple tables per sql and insert multiple rows per sql
# insert: create one or mutiple tables per sql and insert multiple rows per sql
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insert-allDataType.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-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"
)
tdSql
.
checkData
(
0
,
0
,
1000
)
tdSql
.
checkData
(
0
,
0
,
1000
)
...
@@ -65,7 +65,7 @@ class TDTestCase:
...
@@ -65,7 +65,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
200000
)
tdSql
.
checkData
(
0
,
0
,
200000
)
# stmt interface
# stmt interface
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insert-allDataType-stmt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insert-allDataType-stmt.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
,
1000
)
tdSql
.
checkData
(
0
,
0
,
1000
)
...
@@ -81,7 +81,7 @@ class TDTestCase:
...
@@ -81,7 +81,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
200000
)
tdSql
.
checkData
(
0
,
0
,
200000
)
# taosdemo command line
# taosdemo command line
os
.
system
(
"%staos
demo
-t 1000 -n 100 -T 10 -b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,NCHAR,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-t 1000 -n 100 -T 10 -b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,NCHAR,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY -y "
%
binPath
)
tdSql
.
execute
(
"use test"
)
tdSql
.
execute
(
"use test"
)
tdSql
.
query
(
"select count (tbname) from meters"
)
tdSql
.
query
(
"select count (tbname) from meters"
)
tdSql
.
checkData
(
0
,
0
,
1000
)
tdSql
.
checkData
(
0
,
0
,
1000
)
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertTime_step.py
浏览文件 @
90029476
...
@@ -51,7 +51,7 @@ class TDTestCase:
...
@@ -51,7 +51,7 @@ class TDTestCase:
# insert: create one or mutiple tables per sql and insert multiple rows per sql
# insert: create one or mutiple tables per sql and insert multiple rows per sql
# check the params of taosdemo about time_step is nano
# check the params of taosdemo about time_step is nano
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/taosdemoInsertNanoDB.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/taosdemoInsertNanoDB.json -y "
%
binPath
)
tdSql
.
execute
(
"use testdb1"
)
tdSql
.
execute
(
"use testdb1"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
checkData
(
0
,
4
,
100
)
tdSql
.
checkData
(
0
,
4
,
100
)
...
@@ -68,7 +68,7 @@ class TDTestCase:
...
@@ -68,7 +68,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
"2021-07-01 00:00:00.000099000"
)
tdSql
.
checkData
(
0
,
0
,
"2021-07-01 00:00:00.000099000"
)
# check the params of taosdemo about time_step is us
# check the params of taosdemo about time_step is us
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/taosdemoInsertUSDB.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/taosdemoInsertUSDB.json -y "
%
binPath
)
tdSql
.
execute
(
"use testdb2"
)
tdSql
.
execute
(
"use testdb2"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
checkData
(
0
,
4
,
100
)
tdSql
.
checkData
(
0
,
4
,
100
)
...
@@ -85,7 +85,7 @@ class TDTestCase:
...
@@ -85,7 +85,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
"2021-07-01 00:00:00.099000"
)
tdSql
.
checkData
(
0
,
0
,
"2021-07-01 00:00:00.099000"
)
# check the params of taosdemo about time_step is ms
# check the params of taosdemo about time_step is ms
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/taosdemoInsertMSDB.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/taosdemoInsertMSDB.json -y "
%
binPath
)
tdSql
.
execute
(
"use testdb3"
)
tdSql
.
execute
(
"use testdb3"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
checkData
(
0
,
4
,
100
)
tdSql
.
checkData
(
0
,
4
,
100
)
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
浏览文件 @
90029476
...
@@ -53,7 +53,7 @@ class TDTestCase:
...
@@ -53,7 +53,7 @@ class TDTestCase:
os
.
system
(
"rm -rf tools/taosdemoAllTest/%s.sql"
%
testcaseFilename
)
os
.
system
(
"rm -rf tools/taosdemoAllTest/%s.sql"
%
testcaseFilename
)
# insert: create one or mutiple tables per sql and insert multiple rows per sql
# insert: create one or mutiple tables per sql and insert multiple rows per sql
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insert-1s1tnt1r.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insert-1s1tnt1r.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
,
11
)
tdSql
.
checkData
(
0
,
0
,
11
)
...
@@ -69,7 +69,7 @@ class TDTestCase:
...
@@ -69,7 +69,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
2000
)
tdSql
.
checkData
(
0
,
0
,
2000
)
# restful connector insert data
# restful connector insert data
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insertRestful.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insertRestful.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
)
...
@@ -86,7 +86,7 @@ class TDTestCase:
...
@@ -86,7 +86,7 @@ class TDTestCase:
# default values json files
# default values json files
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insert-default.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insert-default.json -y "
%
binPath
)
tdSql
.
query
(
"show databases;"
)
tdSql
.
query
(
"show databases;"
)
for
i
in
range
(
tdSql
.
queryRows
):
for
i
in
range
(
tdSql
.
queryRows
):
if
tdSql
.
queryResult
[
i
][
0
]
==
'db'
:
if
tdSql
.
queryResult
[
i
][
0
]
==
'db'
:
...
@@ -96,7 +96,7 @@ class TDTestCase:
...
@@ -96,7 +96,7 @@ class TDTestCase:
tdSql
.
checkData
(
i
,
16
,
'ms'
)
tdSql
.
checkData
(
i
,
16
,
'ms'
)
# insert: create mutiple tables per sql and insert one rows per sql .
# insert: create mutiple tables per sql and insert one rows per sql .
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insert-1s1tntmr.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insert-1s1tntmr.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
)
...
@@ -113,7 +113,7 @@ class TDTestCase:
...
@@ -113,7 +113,7 @@ class TDTestCase:
# 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
(
"%staos
demo
-f tools/taosdemoAllTest/insert-interval-speed.json -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insert-interval-speed.json -y"
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
checkData
(
0
,
4
,
100
)
tdSql
.
checkData
(
0
,
4
,
100
)
...
@@ -131,9 +131,9 @@ class TDTestCase:
...
@@ -131,9 +131,9 @@ class TDTestCase:
# 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
# insert: using parament "childtable_offset and childtable_limit" to control table'offset point and offset
# insert: using parament "childtable_offset and childtable_limit" to control table'offset point and offset
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insert-nodbnodrop.json -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insert-nodbnodrop.json -y"
%
binPath
)
tdSql
.
error
(
"show dbno.stables"
)
tdSql
.
error
(
"show dbno.stables"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insert-newdb.json -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insert-newdb.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
,
5
)
tdSql
.
checkData
(
0
,
0
,
5
)
...
@@ -145,7 +145,7 @@ class TDTestCase:
...
@@ -145,7 +145,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
8
)
tdSql
.
checkData
(
0
,
0
,
8
)
tdSql
.
query
(
"select count (tbname) from stb4"
)
tdSql
.
query
(
"select count (tbname) from stb4"
)
tdSql
.
checkData
(
0
,
0
,
8
)
tdSql
.
checkData
(
0
,
0
,
8
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insert-offset.json -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insert-offset.json -y"
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
50
)
tdSql
.
checkData
(
0
,
0
,
50
)
...
@@ -157,7 +157,7 @@ class TDTestCase:
...
@@ -157,7 +157,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
180
)
tdSql
.
checkData
(
0
,
0
,
180
)
tdSql
.
query
(
"select count(*) from stb4"
)
tdSql
.
query
(
"select count(*) from stb4"
)
tdSql
.
checkData
(
0
,
0
,
160
)
tdSql
.
checkData
(
0
,
0
,
160
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insert-newtable.json -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insert-newtable.json -y"
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
150
)
tdSql
.
checkData
(
0
,
0
,
150
)
...
@@ -169,7 +169,7 @@ class TDTestCase:
...
@@ -169,7 +169,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
340
)
tdSql
.
checkData
(
0
,
0
,
340
)
tdSql
.
query
(
"select count(*) from stb4"
)
tdSql
.
query
(
"select count(*) from stb4"
)
tdSql
.
checkData
(
0
,
0
,
400
)
tdSql
.
checkData
(
0
,
0
,
400
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insert-renewdb.json -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insert-renewdb.json -y"
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
50
)
tdSql
.
checkData
(
0
,
0
,
50
)
...
@@ -185,30 +185,30 @@ class TDTestCase:
...
@@ -185,30 +185,30 @@ class TDTestCase:
# insert: let parament in json file is illegal, it'll expect error.
# insert: let parament in json file is illegal, it'll expect error.
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insertColumnsAndTagNumLarge4096.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insertColumnsAndTagNumLarge4096.json -y "
%
binPath
)
tdSql
.
error
(
"use db"
)
tdSql
.
error
(
"use db"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insertSigcolumnsNum4096.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insertSigcolumnsNum4096.json -y "
%
binPath
)
tdSql
.
error
(
"select * from db.stb0"
)
tdSql
.
error
(
"select * from db.stb0"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insertColumnsAndTagNum4096.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insertColumnsAndTagNum4096.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
(
"%staos
demo
-f tools/taosdemoAllTest/insertInterlaceRowsLarge1M.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insertInterlaceRowsLarge1M.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
(
"%staos
demo
-f tools/taosdemoAllTest/insertColumnsNum0.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insertColumnsNum0.json -y "
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"show stables like 'stb0%' "
)
tdSql
.
query
(
"show stables like 'stb0%' "
)
tdSql
.
checkData
(
0
,
2
,
11
)
tdSql
.
checkData
(
0
,
2
,
11
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insertTagsNumLarge128.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insertTagsNumLarge128.json -y "
%
binPath
)
tdSql
.
error
(
"use db1"
)
tdSql
.
error
(
"use db1"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insertBinaryLenLarge16374AllcolLar49151.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insertBinaryLenLarge16374AllcolLar49151.json -y "
%
binPath
)
tdSql
.
query
(
"select count(*) from db.stb0"
)
tdSql
.
query
(
"select count(*) from db.stb0"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"select count(*) from db.stb1"
)
tdSql
.
query
(
"select count(*) from db.stb1"
)
...
@@ -218,19 +218,19 @@ class TDTestCase:
...
@@ -218,19 +218,19 @@ class TDTestCase:
tdSql
.
query
(
"select count(*) from db.stb3"
)
tdSql
.
query
(
"select count(*) from db.stb3"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insertNumOfrecordPerReq0.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insertNumOfrecordPerReq0.json -y "
%
binPath
)
tdSql
.
error
(
"select count(*) from db.stb0"
)
tdSql
.
error
(
"select count(*) from db.stb0"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insertNumOfrecordPerReqless0.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insertNumOfrecordPerReqless0.json -y "
%
binPath
)
tdSql
.
error
(
"use db"
)
tdSql
.
error
(
"use db"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insertChildTab0.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insertChildTab0.json -y "
%
binPath
)
tdSql
.
error
(
"use db"
)
tdSql
.
error
(
"use db"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insertChildTabLess0.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insertChildTabLess0.json -y "
%
binPath
)
tdSql
.
error
(
"use db"
)
tdSql
.
error
(
"use db"
)
tdSql
.
execute
(
"drop database if exists blf"
)
tdSql
.
execute
(
"drop database if exists blf"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insertTimestepMulRowsLargeint16.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insertTimestepMulRowsLargeint16.json -y "
%
binPath
)
tdSql
.
execute
(
"use blf"
)
tdSql
.
execute
(
"use blf"
)
tdSql
.
query
(
"select ts from blf.p_0_topics_7 limit 262800,1"
)
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
.
checkData
(
0
,
0
,
"2020-03-31 12:00:00.000"
)
...
@@ -238,7 +238,7 @@ class TDTestCase:
...
@@ -238,7 +238,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
"2019-10-01 00:00:00"
)
tdSql
.
checkData
(
0
,
0
,
"2019-10-01 00:00:00"
)
tdSql
.
query
(
"select last(ts) from blf.p_0_topics_6 "
)
tdSql
.
query
(
"select last(ts) from blf.p_0_topics_6 "
)
tdSql
.
checkData
(
0
,
0
,
"2020-09-29 23:59:00"
)
tdSql
.
checkData
(
0
,
0
,
"2020-09-29 23:59:00"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insertMaxNumPerReq.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insertMaxNumPerReq.json -y "
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
5000000
)
tdSql
.
checkData
(
0
,
0
,
5000000
)
...
@@ -248,7 +248,7 @@ class TDTestCase:
...
@@ -248,7 +248,7 @@ class TDTestCase:
# insert: timestamp and step
# insert: timestamp and step
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insert-timestep.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insert-timestep.json -y "
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
query
(
"select count (tbname) from stb0"
)
tdSql
.
query
(
"select count (tbname) from stb0"
)
...
@@ -265,7 +265,7 @@ class TDTestCase:
...
@@ -265,7 +265,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
400
)
tdSql
.
checkData
(
0
,
0
,
400
)
# # insert: disorder_ratio
# # insert: disorder_ratio
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insert-disorder.json -g 2>&1 -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insert-disorder.json -g 2>&1 -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
,
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
...
@@ -277,7 +277,7 @@ class TDTestCase:
...
@@ -277,7 +277,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
10
)
tdSql
.
checkData
(
0
,
0
,
10
)
# insert: sample json
# insert: sample json
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insert-sample-ts.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insert-sample-ts.json -y "
%
binPath
)
tdSql
.
execute
(
"use dbtest123"
)
tdSql
.
execute
(
"use dbtest123"
)
tdSql
.
query
(
"select c2 from stb0"
)
tdSql
.
query
(
"select c2 from stb0"
)
tdSql
.
checkData
(
0
,
0
,
2147483647
)
tdSql
.
checkData
(
0
,
0
,
2147483647
)
...
@@ -296,7 +296,7 @@ class TDTestCase:
...
@@ -296,7 +296,7 @@ class TDTestCase:
tdSql
.
checkRows
(
10
)
tdSql
.
checkRows
(
10
)
# insert: sample json
# insert: sample json
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insert-sample.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insert-sample.json -y "
%
binPath
)
tdSql
.
execute
(
"use dbtest123"
)
tdSql
.
execute
(
"use dbtest123"
)
tdSql
.
query
(
"select c2 from stb0"
)
tdSql
.
query
(
"select c2 from stb0"
)
tdSql
.
checkData
(
0
,
0
,
2147483647
)
tdSql
.
checkData
(
0
,
0
,
2147483647
)
...
@@ -309,7 +309,7 @@ class TDTestCase:
...
@@ -309,7 +309,7 @@ class TDTestCase:
# insert: test interlace parament
# insert: test interlace parament
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/insert-interlace-row.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/insert-interlace-row.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
,
100
)
tdSql
.
checkData
(
0
,
0
,
100
)
...
@@ -322,7 +322,7 @@ class TDTestCase:
...
@@ -322,7 +322,7 @@ class TDTestCase:
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db'
)
tdSql
.
execute
(
'create database db'
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
os
.
system
(
"%staos
demo
-y -f tools/taosdemoAllTest/insert-drop-exist-auto-N00.json "
%
binPath
)
# drop = no, child_table_exists, auto_create_table varies
os
.
system
(
"%staos
Benchmark
-y -f tools/taosdemoAllTest/insert-drop-exist-auto-N00.json "
%
binPath
)
# drop = no, child_table_exists, auto_create_table varies
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdSql
.
query
(
'show tables like
\'
NN123%
\'
'
)
#child_table_exists = no, auto_create_table varies = 123
tdSql
.
query
(
'show tables like
\'
NN123%
\'
'
)
#child_table_exists = no, auto_create_table varies = 123
tdSql
.
checkRows
(
20
)
tdSql
.
checkRows
(
20
)
...
@@ -338,7 +338,7 @@ class TDTestCase:
...
@@ -338,7 +338,7 @@ class TDTestCase:
tdSql
.
checkRows
(
0
)
tdSql
.
checkRows
(
0
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
os
.
system
(
"%staos
demo
-y -f tools/taosdemoAllTest/insert-drop-exist-auto-Y00.json "
%
binPath
)
# drop = yes, child_table_exists, auto_create_table varies
os
.
system
(
"%staos
Benchmark
-y -f tools/taosdemoAllTest/insert-drop-exist-auto-Y00.json "
%
binPath
)
# drop = yes, child_table_exists, auto_create_table varies
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdSql
.
query
(
'show tables like
\'
YN123%
\'
'
)
#child_table_exists = no, auto_create_table varies = 123
tdSql
.
query
(
'show tables like
\'
YN123%
\'
'
)
#child_table_exists = no, auto_create_table varies = 123
tdSql
.
checkRows
(
20
)
tdSql
.
checkRows
(
20
)
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py
浏览文件 @
90029476
...
@@ -50,7 +50,7 @@ class TDTestCase:
...
@@ -50,7 +50,7 @@ class TDTestCase:
# insert: create one or mutiple tables per sql and insert multiple rows per sql
# insert: create one or mutiple tables per sql and insert multiple rows per sql
# line_protocol——telnet and json
# line_protocol——telnet and json
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insert-1s1tnt1r-sml.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sml/insert-1s1tnt1r-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
)
...
@@ -67,7 +67,7 @@ class TDTestCase:
...
@@ -67,7 +67,7 @@ class TDTestCase:
# insert: create mutiple tables per sql and insert one rows per sql .
# insert: create mutiple tables per sql and insert one rows per sql .
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insert-1s1tntmr-sml.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sml/insert-1s1tntmr-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
)
...
@@ -84,7 +84,7 @@ class TDTestCase:
...
@@ -84,7 +84,7 @@ class TDTestCase:
# 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
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insert-interval-speed-sml.json -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-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 stb0"
)
tdSql
.
checkRows
(
100
)
tdSql
.
checkRows
(
100
)
...
@@ -103,9 +103,9 @@ class TDTestCase:
...
@@ -103,9 +103,9 @@ class TDTestCase:
# insert: drop and child_table_exists combination test
# insert: drop and child_table_exists combination test
# insert: sml can't support parament "childtable_offset and childtable_limit" \ drop=no or child_table_exists = yes
# insert: sml can't support parament "childtable_offset and childtable_limit" \ drop=no or child_table_exists = yes
# os.system("%staos
demo
-f tools/taosdemoAllTest/sml/insert-nodbnodrop-sml.json -y" % binPath)
# os.system("%staos
Benchmark
-f tools/taosdemoAllTest/sml/insert-nodbnodrop-sml.json -y" % binPath)
# tdSql.error("show dbno.stables")
# tdSql.error("show dbno.stables")
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insert-newdb-sml.json -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sml/insert-newdb-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
,
5
)
tdSql
.
checkData
(
0
,
0
,
5
)
...
@@ -117,7 +117,7 @@ class TDTestCase:
...
@@ -117,7 +117,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
8
)
tdSql
.
checkData
(
0
,
0
,
8
)
tdSql
.
query
(
"select count (tbname) from stb4"
)
tdSql
.
query
(
"select count (tbname) from stb4"
)
tdSql
.
checkData
(
0
,
0
,
8
)
tdSql
.
checkData
(
0
,
0
,
8
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insert-renewdb-sml.json -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sml/insert-renewdb-sml.json -y"
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
50
)
tdSql
.
checkData
(
0
,
0
,
50
)
...
@@ -133,29 +133,29 @@ class TDTestCase:
...
@@ -133,29 +133,29 @@ class TDTestCase:
# insert: let parament in json file is illegal, it'll expect error.
# insert: let parament in json file is illegal, it'll expect error.
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insertColumnsAndTagNumLarge4096-sml.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sml/insertColumnsAndTagNumLarge4096-sml.json -y "
%
binPath
)
tdSql
.
error
(
"use db"
)
tdSql
.
error
(
"use db"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insertSigcolumnsNum4096-sml.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sml/insertSigcolumnsNum4096-sml.json -y "
%
binPath
)
tdSql
.
error
(
"select * from db.stb0"
)
tdSql
.
error
(
"select * from db.stb0"
)
# tdSql.execute("drop database if exists db")
# tdSql.execute("drop database if exists db")
# os.system("%staos
demo
-f tools/taosdemoAllTest/sml/insertColumnsAndTagNum4096-sml.json -y " % binPath)
# os.system("%staos
Benchmark
-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
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insertInterlaceRowsLarge1M-sml.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-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
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insertColumnsNum0-sml.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sml/insertColumnsNum0-sml.json -y "
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"show stables like 'stb0%' "
)
tdSql
.
query
(
"show stables like 'stb0%' "
)
tdSql
.
checkData
(
0
,
2
,
11
)
tdSql
.
checkData
(
0
,
2
,
11
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insertTagsNumLarge128-sml.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sml/insertTagsNumLarge128-sml.json -y "
%
binPath
)
tdSql
.
error
(
"use db1"
)
tdSql
.
error
(
"use db1"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insertBinaryLenLarge16374AllcolLar49151-sml.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sml/insertBinaryLenLarge16374AllcolLar49151-sml.json -y "
%
binPath
)
tdSql
.
query
(
"select count(*) from db.stb0"
)
tdSql
.
query
(
"select count(*) from db.stb0"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"select count(*) from db.stb1"
)
tdSql
.
query
(
"select count(*) from db.stb1"
)
...
@@ -165,19 +165,19 @@ class TDTestCase:
...
@@ -165,19 +165,19 @@ class TDTestCase:
tdSql
.
query
(
"select count(*) from db.stb3"
)
tdSql
.
query
(
"select count(*) from db.stb3"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insertNumOfrecordPerReq0-sml.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sml/insertNumOfrecordPerReq0-sml.json -y "
%
binPath
)
tdSql
.
error
(
"select count(*) from db.stb0"
)
tdSql
.
error
(
"select count(*) from db.stb0"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insertNumOfrecordPerReqless0-sml.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sml/insertNumOfrecordPerReqless0-sml.json -y "
%
binPath
)
tdSql
.
error
(
"use db"
)
tdSql
.
error
(
"use db"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insertChildTab0-sml.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sml/insertChildTab0-sml.json -y "
%
binPath
)
tdSql
.
error
(
"use db"
)
tdSql
.
error
(
"use db"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insertChildTabLess0-sml.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sml/insertChildTabLess0-sml.json -y "
%
binPath
)
tdSql
.
error
(
"use db"
)
tdSql
.
error
(
"use db"
)
tdSql
.
execute
(
"drop database if exists blf"
)
tdSql
.
execute
(
"drop database if exists blf"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insertTimestepMulRowsLargeint16-sml.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sml/insertTimestepMulRowsLargeint16-sml.json -y "
%
binPath
)
tdSql
.
execute
(
"use blf"
)
tdSql
.
execute
(
"use blf"
)
tdSql
.
query
(
"select ts from blf.p_0_topics_7 limit 262800,1"
)
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
.
checkData
(
0
,
0
,
"2020-03-31 12:00:00.000"
)
...
@@ -186,13 +186,13 @@ class TDTestCase:
...
@@ -186,13 +186,13 @@ class TDTestCase:
tdSql
.
query
(
"select last(ts) from blf.p_0_topics_6 "
)
tdSql
.
query
(
"select last(ts) from blf.p_0_topics_6 "
)
tdSql
.
checkData
(
0
,
0
,
"2020-09-29 23:59:00"
)
tdSql
.
checkData
(
0
,
0
,
"2020-09-29 23:59:00"
)
# it will be commented in ci because it spend too much time to insert data, but when you can excute it when you want to test this case.
# it will be commented in ci because it spend too much time to insert data, but when you can excute it when you want to test this case.
# os.system("%staos
demo
-f tools/taosdemoAllTest/sml/insertMaxNumPerReq-sml.json -y " % binPath)
# os.system("%staos
Benchmark
-f tools/taosdemoAllTest/sml/insertMaxNumPerReq-sml.json -y " % binPath)
# tdSql.execute("use db")
# tdSql.execute("use db")
# tdSql.query("select count(*) from stb0")
# tdSql.query("select count(*) from stb0")
# tdSql.checkData(0, 0, 5000000)
# tdSql.checkData(0, 0, 5000000)
# tdSql.query("select count(*) from stb1")
# tdSql.query("select count(*) from stb1")
# tdSql.checkData(0, 0, 5000000)
# tdSql.checkData(0, 0, 5000000)
# os.system("%staos
demo
-f tools/taosdemoAllTest/sml/insertMaxNumPerReq-sml-telnet.json -y " % binPath)
# os.system("%staos
Benchmark
-f tools/taosdemoAllTest/sml/insertMaxNumPerReq-sml-telnet.json -y " % binPath)
# tdSql.execute("use db")
# tdSql.execute("use db")
# tdSql.query("select count(*) from stb0")
# tdSql.query("select count(*) from stb0")
# tdSql.checkData(0, 0, 5000000)
# tdSql.checkData(0, 0, 5000000)
...
@@ -201,7 +201,7 @@ class TDTestCase:
...
@@ -201,7 +201,7 @@ class TDTestCase:
# insert: timestamp and step
# insert: timestamp and step
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insert-timestep-sml.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sml/insert-timestep-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
)
...
@@ -217,7 +217,7 @@ class TDTestCase:
...
@@ -217,7 +217,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
400
)
tdSql
.
checkData
(
0
,
0
,
400
)
# # insert: disorder_ratio
# # insert: disorder_ratio
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insert-disorder-sml.json 2>&1 -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sml/insert-disorder-sml.json 2>&1 -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
,
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
...
@@ -229,7 +229,7 @@ class TDTestCase:
...
@@ -229,7 +229,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
10
)
tdSql
.
checkData
(
0
,
0
,
10
)
# insert: sample json
# insert: sample json
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insert-sample-sml.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sml/insert-sample-sml.json -y "
%
binPath
)
tdSql
.
execute
(
"use dbtest123"
)
tdSql
.
execute
(
"use dbtest123"
)
tdSql
.
query
(
"select c2 from stb0"
)
tdSql
.
query
(
"select c2 from stb0"
)
tdSql
.
checkData
(
0
,
0
,
2147483647
)
tdSql
.
checkData
(
0
,
0
,
2147483647
)
...
@@ -241,7 +241,7 @@ class TDTestCase:
...
@@ -241,7 +241,7 @@ class TDTestCase:
tdSql
.
checkRows
(
10
)
tdSql
.
checkRows
(
10
)
# insert: test interlace parament
# insert: test interlace parament
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/sml/insert-interlace-row-sml.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/sml/insert-interlace-row-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
,
100
)
tdSql
.
checkData
(
0
,
0
,
100
)
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonStmt.py
浏览文件 @
90029476
...
@@ -49,7 +49,7 @@ class TDTestCase:
...
@@ -49,7 +49,7 @@ class TDTestCase:
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
# insert: create one or mutiple tables per sql and insert multiple rows per sql
# insert: create one or mutiple tables per sql and insert multiple rows per sql
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insert-1s1tnt1r-stmt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insert-1s1tnt1r-stmt.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
,
1000
)
tdSql
.
checkData
(
0
,
0
,
1000
)
...
@@ -66,7 +66,7 @@ class TDTestCase:
...
@@ -66,7 +66,7 @@ class TDTestCase:
# insert: create mutiple tables per sql and insert one rows per sql .
# insert: create mutiple tables per sql and insert one rows per sql .
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insert-1s1tntmr-stmt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insert-1s1tntmr-stmt.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
)
...
@@ -83,7 +83,7 @@ class TDTestCase:
...
@@ -83,7 +83,7 @@ class TDTestCase:
# 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
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insert-interval-speed-stmt.json -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insert-interval-speed-stmt.json -y"
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
checkData
(
0
,
4
,
100
)
tdSql
.
checkData
(
0
,
4
,
100
)
...
@@ -101,9 +101,9 @@ class TDTestCase:
...
@@ -101,9 +101,9 @@ class TDTestCase:
# 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
# insert: using parament "childtable_offset and childtable_limit" to control table'offset point and offset
# insert: using parament "childtable_offset and childtable_limit" to control table'offset point and offset
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insert-nodbnodrop-stmt.json -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insert-nodbnodrop-stmt.json -y"
%
binPath
)
tdSql
.
error
(
"show dbno.stables"
)
tdSql
.
error
(
"show dbno.stables"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insert-newdb-stmt.json -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insert-newdb-stmt.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
,
5
)
tdSql
.
checkData
(
0
,
0
,
5
)
...
@@ -115,7 +115,7 @@ class TDTestCase:
...
@@ -115,7 +115,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
8
)
tdSql
.
checkData
(
0
,
0
,
8
)
tdSql
.
query
(
"select count (tbname) from stb4"
)
tdSql
.
query
(
"select count (tbname) from stb4"
)
tdSql
.
checkData
(
0
,
0
,
8
)
tdSql
.
checkData
(
0
,
0
,
8
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insert-offset-stmt.json -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insert-offset-stmt.json -y"
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
50
)
tdSql
.
checkData
(
0
,
0
,
50
)
...
@@ -127,7 +127,7 @@ class TDTestCase:
...
@@ -127,7 +127,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
180
)
tdSql
.
checkData
(
0
,
0
,
180
)
tdSql
.
query
(
"select count(*) from stb4"
)
tdSql
.
query
(
"select count(*) from stb4"
)
tdSql
.
checkData
(
0
,
0
,
160
)
tdSql
.
checkData
(
0
,
0
,
160
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insert-newtable-stmt.json -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insert-newtable-stmt.json -y"
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
150
)
tdSql
.
checkData
(
0
,
0
,
150
)
...
@@ -139,7 +139,7 @@ class TDTestCase:
...
@@ -139,7 +139,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
340
)
tdSql
.
checkData
(
0
,
0
,
340
)
tdSql
.
query
(
"select count(*) from stb4"
)
tdSql
.
query
(
"select count(*) from stb4"
)
tdSql
.
checkData
(
0
,
0
,
400
)
tdSql
.
checkData
(
0
,
0
,
400
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insert-renewdb-stmt.json -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insert-renewdb-stmt.json -y"
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
50
)
tdSql
.
checkData
(
0
,
0
,
50
)
...
@@ -155,29 +155,29 @@ class TDTestCase:
...
@@ -155,29 +155,29 @@ class TDTestCase:
# insert: let parament in json file is illegal, it'll expect error.
# insert: let parament in json file is illegal, it'll expect error.
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insertColumnsAndTagNumLarge4096-stmt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insertColumnsAndTagNumLarge4096-stmt.json -y "
%
binPath
)
tdSql
.
error
(
"use db"
)
tdSql
.
error
(
"use db"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insertSigcolumnsNum4096-stmt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insertSigcolumnsNum4096-stmt.json -y "
%
binPath
)
tdSql
.
error
(
"select * from db.stb0"
)
tdSql
.
error
(
"select * from db.stb0"
)
# tdSql.execute("drop database if exists db")
# tdSql.execute("drop database if exists db")
# os.system("%staos
demo
-f tools/taosdemoAllTest/stmt/insertColumnsAndTagNum4096-stmt.json -y " % binPath)
# os.system("%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insertColumnsAndTagNum4096-stmt.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
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insertInterlaceRowsLarge1M-stmt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insertInterlaceRowsLarge1M-stmt.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
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insertColumnsNum0-stmt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insertColumnsNum0-stmt.json -y "
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"show stables like 'stb0%' "
)
tdSql
.
query
(
"show stables like 'stb0%' "
)
tdSql
.
checkData
(
0
,
2
,
11
)
tdSql
.
checkData
(
0
,
2
,
11
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insertTagsNumLarge128-stmt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insertTagsNumLarge128-stmt.json -y "
%
binPath
)
tdSql
.
error
(
"use db1"
)
tdSql
.
error
(
"use db1"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insertBinaryLenLarge16374AllcolLar49151-stmt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insertBinaryLenLarge16374AllcolLar49151-stmt.json -y "
%
binPath
)
tdSql
.
query
(
"select count(*) from db.stb0"
)
tdSql
.
query
(
"select count(*) from db.stb0"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"select count(*) from db.stb1"
)
tdSql
.
query
(
"select count(*) from db.stb1"
)
...
@@ -187,19 +187,19 @@ class TDTestCase:
...
@@ -187,19 +187,19 @@ class TDTestCase:
tdSql
.
query
(
"select count(*) from db.stb3"
)
tdSql
.
query
(
"select count(*) from db.stb3"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insertNumOfrecordPerReq0-stmt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insertNumOfrecordPerReq0-stmt.json -y "
%
binPath
)
tdSql
.
error
(
"select count(*) from db.stb0"
)
tdSql
.
error
(
"select count(*) from db.stb0"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insertNumOfrecordPerReqless0-stmt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insertNumOfrecordPerReqless0-stmt.json -y "
%
binPath
)
tdSql
.
error
(
"use db"
)
tdSql
.
error
(
"use db"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insertChildTab0-stmt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insertChildTab0-stmt.json -y "
%
binPath
)
tdSql
.
error
(
"use db"
)
tdSql
.
error
(
"use db"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insertChildTabLess0-stmt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insertChildTabLess0-stmt.json -y "
%
binPath
)
tdSql
.
error
(
"use db"
)
tdSql
.
error
(
"use db"
)
tdSql
.
execute
(
"drop database if exists blf"
)
tdSql
.
execute
(
"drop database if exists blf"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insertTimestepMulRowsLargeint16-stmt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insertTimestepMulRowsLargeint16-stmt.json -y "
%
binPath
)
tdSql
.
execute
(
"use blf"
)
tdSql
.
execute
(
"use blf"
)
tdSql
.
query
(
"select ts from blf.p_0_topics_7 limit 262800,1"
)
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
.
checkData
(
0
,
0
,
"2020-03-31 12:00:00.000"
)
...
@@ -207,7 +207,7 @@ class TDTestCase:
...
@@ -207,7 +207,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
"2019-10-01 00:00:00"
)
tdSql
.
checkData
(
0
,
0
,
"2019-10-01 00:00:00"
)
tdSql
.
query
(
"select last(ts) from blf.p_0_topics_6 "
)
tdSql
.
query
(
"select last(ts) from blf.p_0_topics_6 "
)
tdSql
.
checkData
(
0
,
0
,
"2020-09-29 23:59:00"
)
tdSql
.
checkData
(
0
,
0
,
"2020-09-29 23:59:00"
)
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insertMaxNumPerReq-stmt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insertMaxNumPerReq-stmt.json -y "
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
5000000
)
tdSql
.
checkData
(
0
,
0
,
5000000
)
...
@@ -216,7 +216,7 @@ class TDTestCase:
...
@@ -216,7 +216,7 @@ class TDTestCase:
# insert: sample json
# insert: sample json
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insert-sample-ts-stmt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insert-sample-ts-stmt.json -y "
%
binPath
)
tdSql
.
execute
(
"use dbtest123"
)
tdSql
.
execute
(
"use dbtest123"
)
tdSql
.
query
(
"select c2 from stb0"
)
tdSql
.
query
(
"select c2 from stb0"
)
tdSql
.
checkData
(
0
,
0
,
2147483647
)
tdSql
.
checkData
(
0
,
0
,
2147483647
)
...
@@ -235,7 +235,7 @@ class TDTestCase:
...
@@ -235,7 +235,7 @@ class TDTestCase:
tdSql
.
checkRows
(
10
)
tdSql
.
checkRows
(
10
)
# insert: timestamp and step
# insert: timestamp and step
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insert-timestep-stmt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insert-timestep-stmt.json -y "
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
query
(
"select count (tbname) from stb0"
)
tdSql
.
query
(
"select count (tbname) from stb0"
)
...
@@ -252,7 +252,7 @@ class TDTestCase:
...
@@ -252,7 +252,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
400
)
tdSql
.
checkData
(
0
,
0
,
400
)
# # insert: disorder_ratio
# # insert: disorder_ratio
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insert-disorder-stmt.json 2>&1 -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insert-disorder-stmt.json 2>&1 -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
,
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
...
@@ -264,7 +264,7 @@ class TDTestCase:
...
@@ -264,7 +264,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
10
)
tdSql
.
checkData
(
0
,
0
,
10
)
# insert: sample json
# insert: sample json
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insert-sample-stmt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insert-sample-stmt.json -y "
%
binPath
)
tdSql
.
execute
(
"use dbtest123"
)
tdSql
.
execute
(
"use dbtest123"
)
tdSql
.
query
(
"select c2 from stb0"
)
tdSql
.
query
(
"select c2 from stb0"
)
tdSql
.
checkData
(
0
,
0
,
2147483647
)
tdSql
.
checkData
(
0
,
0
,
2147483647
)
...
@@ -276,7 +276,7 @@ class TDTestCase:
...
@@ -276,7 +276,7 @@ class TDTestCase:
tdSql
.
checkRows
(
10
)
tdSql
.
checkRows
(
10
)
# insert: test interlace parament
# insert: test interlace parament
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/insert-interlace-row-stmt.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/insert-interlace-row-stmt.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
,
100
)
tdSql
.
checkData
(
0
,
0
,
100
)
...
@@ -289,7 +289,7 @@ class TDTestCase:
...
@@ -289,7 +289,7 @@ class TDTestCase:
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db'
)
tdSql
.
execute
(
'create database db'
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
os
.
system
(
"%staos
demo
-y -f tools/taosdemoAllTest/stmt/insert-drop-exist-auto-N00-stmt.json "
%
binPath
)
# drop = no, child_table_exists, auto_create_table varies
os
.
system
(
"%staos
Benchmark
-y -f tools/taosdemoAllTest/stmt/insert-drop-exist-auto-N00-stmt.json "
%
binPath
)
# drop = no, child_table_exists, auto_create_table varies
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdSql
.
query
(
'show tables like
\'
NN123%
\'
'
)
#child_table_exists = no, auto_create_table varies = 123
tdSql
.
query
(
'show tables like
\'
NN123%
\'
'
)
#child_table_exists = no, auto_create_table varies = 123
tdSql
.
checkRows
(
20
)
tdSql
.
checkRows
(
20
)
...
@@ -305,7 +305,7 @@ class TDTestCase:
...
@@ -305,7 +305,7 @@ class TDTestCase:
tdSql
.
checkRows
(
0
)
tdSql
.
checkRows
(
0
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
os
.
system
(
"%staos
demo
-y -f tools/taosdemoAllTest/stmt/insert-drop-exist-auto-Y00-stmt.json "
%
binPath
)
# drop = yes, child_table_exists, auto_create_table varies
os
.
system
(
"%staos
Benchmark
-y -f tools/taosdemoAllTest/stmt/insert-drop-exist-auto-Y00-stmt.json "
%
binPath
)
# drop = yes, child_table_exists, auto_create_table varies
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdSql
.
query
(
'show tables like
\'
YN123%
\'
'
)
#child_table_exists = no, auto_create_table varies = 123
tdSql
.
query
(
'show tables like
\'
YN123%
\'
'
)
#child_table_exists = no, auto_create_table varies = 123
tdSql
.
checkRows
(
20
)
tdSql
.
checkRows
(
20
)
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonStmtPerformance.py
浏览文件 @
90029476
...
@@ -49,16 +49,16 @@ class TDTestCase:
...
@@ -49,16 +49,16 @@ class TDTestCase:
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
# insert: create one or mutiple tables per sql and insert multiple rows per sql
# insert: create one or mutiple tables per sql and insert multiple rows per sql
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/stmt/1174-small-stmt-random.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/stmt/1174-small-stmt-random.json -y "
%
binPath
)
# sleep(60)
# sleep(60)
# os.system("%staos
demo
-f tools/taosdemoAllTest/stmt/1174-small-taosc.json -y " % binPath)
# os.system("%staos
Benchmark
-f tools/taosdemoAllTest/stmt/1174-small-taosc.json -y " % binPath)
# sleep(60)
# sleep(60)
# os.system("%staos
demo
-f tools/taosdemoAllTest/stmt/1174-small-stmt.json -y " % binPath)
# os.system("%staos
Benchmark
-f tools/taosdemoAllTest/stmt/1174-small-stmt.json -y " % binPath)
# sleep(60)
# sleep(60)
# os.system("%staos
demo
-f tools/taosdemoAllTest/stmt/1174-large-taosc.json -y " % binPath)
# os.system("%staos
Benchmark
-f tools/taosdemoAllTest/stmt/1174-large-taosc.json -y " % binPath)
# sleep(60)
# sleep(60)
# os.system("%staos
demo
-f tools/taosdemoAllTest/stmt/1174-large-stmt.json -y " % binPath)
# os.system("%staos
Benchmark
-f tools/taosdemoAllTest/stmt/1174-large-stmt.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")
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestQueryWithJson.py
浏览文件 @
90029476
...
@@ -108,10 +108,10 @@ class TDTestCase:
...
@@ -108,10 +108,10 @@ class TDTestCase:
# taosc query: query specified table and query super table
# taosc query: query specified table and query super table
os
.
system
(
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/queryInsertdata.json"
%
"%staos
Benchmark
-f tools/taosdemoAllTest/queryInsertdata.json"
%
binPath
)
binPath
)
os
.
system
(
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/queryTaosc.json"
%
"%staos
Benchmark
-f tools/taosdemoAllTest/queryTaosc.json"
%
binPath
)
binPath
)
os
.
system
(
"cat query_res0.txt* > all_query_res0_taosc.txt"
)
os
.
system
(
"cat query_res0.txt* > all_query_res0_taosc.txt"
)
os
.
system
(
"cat query_res1.txt* > all_query_res1_taosc.txt"
)
os
.
system
(
"cat query_res1.txt* > all_query_res1_taosc.txt"
)
...
@@ -138,10 +138,10 @@ class TDTestCase:
...
@@ -138,10 +138,10 @@ class TDTestCase:
# use restful api to query
# use restful api to query
os
.
system
(
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/queryInsertrestdata.json"
%
"%staos
Benchmark
-f tools/taosdemoAllTest/queryInsertrestdata.json"
%
binPath
)
binPath
)
os
.
system
(
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/queryRestful.json"
%
"%staos
Benchmark
-f tools/taosdemoAllTest/queryRestful.json"
%
binPath
)
binPath
)
os
.
system
(
"cat query_res0.txt* > all_query_res0_rest.txt"
)
os
.
system
(
"cat query_res0.txt* > all_query_res0_rest.txt"
)
os
.
system
(
"cat query_res1.txt* > all_query_res1_rest.txt"
)
os
.
system
(
"cat query_res1.txt* > all_query_res1_rest.txt"
)
...
@@ -175,55 +175,55 @@ class TDTestCase:
...
@@ -175,55 +175,55 @@ class TDTestCase:
# query times less than or equal to 100
# query times less than or equal to 100
os
.
system
(
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/queryInsertdata.json"
%
"%staos
Benchmark
-f tools/taosdemoAllTest/queryInsertdata.json"
%
binPath
)
binPath
)
os
.
system
(
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/querySpeciMutisql100.json"
%
"%staos
Benchmark
-f tools/taosdemoAllTest/querySpeciMutisql100.json"
%
binPath
)
binPath
)
os
.
system
(
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/querySuperMutisql100.json"
%
"%staos
Benchmark
-f tools/taosdemoAllTest/querySuperMutisql100.json"
%
binPath
)
binPath
)
# query result print QPS
# query result print QPS
os
.
system
(
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/queryInsertdata.json"
%
"%staos
Benchmark
-f tools/taosdemoAllTest/queryInsertdata.json"
%
binPath
)
binPath
)
exceptcode
=
os
.
system
(
exceptcode
=
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/queryQps.json"
%
"%staos
Benchmark
-f tools/taosdemoAllTest/queryQps.json"
%
binPath
)
binPath
)
assert
exceptcode
==
0
assert
exceptcode
==
0
# use illegal or out of range parameters query json file
# use illegal or out of range parameters query json file
os
.
system
(
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/queryInsertdata.json"
%
"%staos
Benchmark
-f tools/taosdemoAllTest/queryInsertdata.json"
%
binPath
)
binPath
)
exceptcode
=
os
.
system
(
exceptcode
=
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/queryTimes0.json"
%
"%staos
Benchmark
-f tools/taosdemoAllTest/queryTimes0.json"
%
binPath
)
binPath
)
assert
exceptcode
!=
0
assert
exceptcode
!=
0
exceptcode0
=
os
.
system
(
exceptcode0
=
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/queryTimesless0.json"
%
"%staos
Benchmark
-f tools/taosdemoAllTest/queryTimesless0.json"
%
binPath
)
binPath
)
assert
exceptcode0
!=
0
assert
exceptcode0
!=
0
exceptcode1
=
os
.
system
(
exceptcode1
=
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/queryConcurrentless0.json"
%
"%staos
Benchmark
-f tools/taosdemoAllTest/queryConcurrentless0.json"
%
binPath
)
binPath
)
assert
exceptcode1
!=
0
assert
exceptcode1
!=
0
exceptcode2
=
os
.
system
(
exceptcode2
=
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/queryConcurrent0.json"
%
"%staos
Benchmark
-f tools/taosdemoAllTest/queryConcurrent0.json"
%
binPath
)
binPath
)
assert
exceptcode2
!=
0
assert
exceptcode2
!=
0
exceptcode3
=
os
.
system
(
exceptcode3
=
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/querrThreadsless0.json"
%
"%staos
Benchmark
-f tools/taosdemoAllTest/querrThreadsless0.json"
%
binPath
)
binPath
)
assert
exceptcode3
!=
0
assert
exceptcode3
!=
0
exceptcode4
=
os
.
system
(
exceptcode4
=
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/querrThreads0.json"
%
"%staos
Benchmark
-f tools/taosdemoAllTest/querrThreads0.json"
%
binPath
)
binPath
)
assert
exceptcode4
!=
0
assert
exceptcode4
!=
0
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py
浏览文件 @
90029476
...
@@ -74,8 +74,8 @@ class TDTestCase:
...
@@ -74,8 +74,8 @@ class TDTestCase:
os
.
system
(
"rm -rf ./all_subscribe_res*"
)
os
.
system
(
"rm -rf ./all_subscribe_res*"
)
sleep
(
2
)
sleep
(
2
)
# subscribe: sync
# subscribe: sync
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/subInsertdata.json"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/subInsertdata.json"
%
binPath
)
os
.
system
(
"nohup %staos
demo
-f tools/taosdemoAllTest/subSync.json &"
%
binPath
)
os
.
system
(
"nohup %staos
Benchmark
-f tools/taosdemoAllTest/subSync.json &"
%
binPath
)
query_pid
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep "taosdemoAllTest/subSync.json" |grep -v "grep"|awk
\'
{print $2}
\'
'
)[
1
])
query_pid
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep "taosdemoAllTest/subSync.json" |grep -v "grep"|awk
\'
{print $2}
\'
'
)[
1
])
# insert extral data
# insert extral data
...
@@ -112,21 +112,21 @@ class TDTestCase:
...
@@ -112,21 +112,21 @@ class TDTestCase:
os
.
system
(
"rm -rf ./all_subscribe*"
)
os
.
system
(
"rm -rf ./all_subscribe*"
)
# # sql number lager 100
# # sql number lager 100
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/subInsertdataMaxsql100.json"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/subInsertdataMaxsql100.json"
%
binPath
)
assert
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/subSyncSpecMaxsql100.json"
%
binPath
)
!=
0
assert
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/subSyncSpecMaxsql100.json"
%
binPath
)
!=
0
assert
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/subSyncSuperMaxsql100.json"
%
binPath
)
!=
0
assert
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/subSyncSuperMaxsql100.json"
%
binPath
)
!=
0
# # result files is null
# # result files is null
# os.system("%staos
demo
-f tools/taosdemoAllTest/subInsertdataMaxsql100.json" % binPath)
# os.system("%staos
Benchmark
-f tools/taosdemoAllTest/subInsertdataMaxsql100.json" % binPath)
# os.system("%staos
demo
-f tools/taosdemoAllTest/subSyncResFileNull.json" % binPath)
# os.system("%staos
Benchmark
-f tools/taosdemoAllTest/subSyncResFileNull.json" % binPath)
# # assert os.system("%staos
demo
-f tools/taosdemoAllTest/subSyncResFileNull.json" % binPath) != 0
# # assert os.system("%staos
Benchmark
-f tools/taosdemoAllTest/subSyncResFileNull.json" % binPath) != 0
# resubAfterConsume= -1 endAfter=-1 ;
# resubAfterConsume= -1 endAfter=-1 ;
os
.
system
(
'kill -9 `ps aux|grep "subSyncResubACMinus1.json" |grep -v "grep"|awk
\'
{print $2}
\'
` '
)
os
.
system
(
'kill -9 `ps aux|grep "subSyncResubACMinus1.json" |grep -v "grep"|awk
\'
{print $2}
\'
` '
)
os
.
system
(
"nohup %staos
demo
-f tools/taosdemoAllTest/Resubjson/subSyncResubACMinus1.json & "
%
binPath
)
os
.
system
(
"nohup %staos
Benchmark
-f tools/taosdemoAllTest/Resubjson/subSyncResubACMinus1.json & "
%
binPath
)
sleep
(
2
)
sleep
(
2
)
query_pid1
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep "subSyncResubACMinus1.json" |grep -v "grep"|awk
\'
{print $2}
\'
'
)[
1
])
query_pid1
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep "subSyncResubACMinus1.json" |grep -v "grep"|awk
\'
{print $2}
\'
'
)[
1
])
print
(
"get sub1 process'pid"
)
print
(
"get sub1 process'pid"
)
...
@@ -144,9 +144,9 @@ class TDTestCase:
...
@@ -144,9 +144,9 @@ class TDTestCase:
os
.
system
(
"rm -rf ./subscribe_res*"
)
os
.
system
(
"rm -rf ./subscribe_res*"
)
# # resubAfterConsume= -1 endAfter=0 ;
# # resubAfterConsume= -1 endAfter=0 ;
# os.system("%staos
demo
-f tools/taosdemoAllTest/subInsertdataMaxsql100.json" % binPath)
# os.system("%staos
Benchmark
-f tools/taosdemoAllTest/subInsertdataMaxsql100.json" % binPath)
# os.system('kill -9 `ps aux|grep "subSyncResubACMinus1endAfter0.json" |grep -v "grep"|awk \'{print $2}\'` ')
# os.system('kill -9 `ps aux|grep "subSyncResubACMinus1endAfter0.json" |grep -v "grep"|awk \'{print $2}\'` ')
# os.system("nohup %staos
demo
-f tools/taosdemoAllTest/Resubjson/subSyncResubACMinus1endAfter0.json & " % binPath)
# os.system("nohup %staos
Benchmark
-f tools/taosdemoAllTest/Resubjson/subSyncResubACMinus1endAfter0.json & " % binPath)
# sleep(2)
# sleep(2)
# query_pid1 = int(subprocess.getstatusoutput('ps aux|grep "subSyncResubACMinus1endAfter0.json" |grep -v "grep"|awk \'{print $2}\'')[1])
# query_pid1 = int(subprocess.getstatusoutput('ps aux|grep "subSyncResubACMinus1endAfter0.json" |grep -v "grep"|awk \'{print $2}\'')[1])
# print("get sub2 process'pid")
# print("get sub2 process'pid")
...
@@ -185,8 +185,8 @@ class TDTestCase:
...
@@ -185,8 +185,8 @@ class TDTestCase:
# self.assertCheck("all_subscribe_res2.txt",subTimes2 ,1900)
# self.assertCheck("all_subscribe_res2.txt",subTimes2 ,1900)
# os.system("%staos
demo
-f tools/taosdemoAllTest/subSupermaxsql100.json" % binPath)
# os.system("%staos
Benchmark
-f tools/taosdemoAllTest/subSupermaxsql100.json" % binPath)
# os.system("%staos
demo
-f tools/taosdemoAllTest/subSupermaxsql100.json" % binPath)
# os.system("%staos
Benchmark
-f tools/taosdemoAllTest/subSupermaxsql100.json" % binPath)
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJsonAsync.py
浏览文件 @
90029476
...
@@ -72,8 +72,8 @@ class TDTestCase:
...
@@ -72,8 +72,8 @@ class TDTestCase:
os
.
system
(
"rm -rf ./all_subscribe_res*"
)
os
.
system
(
"rm -rf ./all_subscribe_res*"
)
# subscribe: resultfile
# subscribe: resultfile
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/subInsertdata.json"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/subInsertdata.json"
%
binPath
)
os
.
system
(
"nohup %staos
demo
-f tools/taosdemoAllTest/subAsync.json &"
%
binPath
)
os
.
system
(
"nohup %staos
Benchmark
-f tools/taosdemoAllTest/subAsync.json &"
%
binPath
)
query_pid
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep "taosdemoAllTest/subAsync.json" |grep -v "grep"|awk
\'
{print $2}
\'
'
)[
1
])
query_pid
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep "taosdemoAllTest/subAsync.json" |grep -v "grep"|awk
\'
{print $2}
\'
'
)[
1
])
# insert extral data
# insert extral data
...
@@ -106,9 +106,9 @@ class TDTestCase:
...
@@ -106,9 +106,9 @@ class TDTestCase:
os
.
system
(
"kill -9 %d"
%
query_pid
)
os
.
system
(
"kill -9 %d"
%
query_pid
)
# # query times less than or equal to 100
# # query times less than or equal to 100
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/subInsertdataMaxsql100.json"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/subInsertdataMaxsql100.json"
%
binPath
)
assert
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/subSyncSpecMaxsql100.json"
%
binPath
)
!=
0
assert
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/subSyncSpecMaxsql100.json"
%
binPath
)
!=
0
assert
os
.
system
(
"%staos
demo
-f tools/taosdemoAllTest/subSyncSuperMaxsql100.json"
%
binPath
)
!=
0
assert
os
.
system
(
"%staos
Benchmark
-f tools/taosdemoAllTest/subSyncSuperMaxsql100.json"
%
binPath
)
!=
0
# delete useless files
# delete useless files
os
.
system
(
"rm -rf ./insert_res.txt"
)
os
.
system
(
"rm -rf ./insert_res.txt"
)
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoInsert.py
已删除
100644 → 0
浏览文件 @
28c644b7
###################################################################
# 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
*
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/"
# insert: create one or mutiple tables per sql and insert multiple rows per sql
# insert data from a special timestamp
# check stable stb0
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/taosdemoTestNanoDatabase.json -y "
%
binPath
)
tdSql
.
execute
(
"use nsdb"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
checkData
(
0
,
4
,
100
)
tdSql
.
query
(
"select count (tbname) from stb0"
)
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
)
tdSql
.
query
(
"describe stb0"
)
tdSql
.
checkDataType
(
9
,
1
,
"TIMESTAMP"
)
tdSql
.
query
(
"select last(ts) from stb0"
)
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
)
tdSql
.
query
(
"select count(*) from tb1_0"
)
tdSql
.
checkData
(
0
,
0
,
100
)
tdSql
.
query
(
"select count(*) from stb1"
)
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:00: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
)
tdSql
.
query
(
"select count (tbname) from stb0"
)
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
)
# check c8 is an nano timestamp
tdSql
.
query
(
"describe stb0"
)
tdSql
.
checkDataType
(
9
,
1
,
"TIMESTAMP"
)
# insert by csv files and timetamp is long int , strings in ts and
# cols
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/taosdemoTestNanoDatabasecsv.json -y "
%
binPath
)
tdSql
.
execute
(
"use nsdbcsv"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
checkData
(
0
,
4
,
100
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
10000
)
tdSql
.
query
(
"describe stb0"
)
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 < 1626918583000000000"
)
tdSql
.
checkData
(
0
,
0
,
10000
)
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 -ptaosdata -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 36500 days 6 update 1;'
,
'use nsdbsql;'
,
'CREATE STABLE meters (ts timestamp, current float, voltage int, phase float) TAGS (location binary(64), groupdId int);'
,
'CREATE TABLE d1001 USING meters TAGS ("Beijing.Chaoyang", 2);'
,
'INSERT INTO d1001 USING METERS TAGS ("Beijng.Chaoyang", 2) VALUES (now, 10.2, 219, 0.32);'
,
'INSERT INTO d1001 USING METERS TAGS ("Beijng.Chaoyang", 2) VALUES (now, 85, 32, 0.76);'
]
with
open
(
"./taosdemoTestNanoCreateDB.sql"
,
mode
=
"a"
)
as
sql_files
:
for
sql
in
sqls_ls
:
sql_files
.
write
(
sql
+
"
\n
"
)
sql_files
.
close
()
sleep
(
10
)
os
.
system
(
"%staosdemo -s taosdemoTestNanoCreateDB.sql -y "
%
binPath
)
tdSql
.
query
(
"select count(*) from nsdbsql.meters"
)
tdSql
.
checkData
(
0
,
0
,
2
)
os
.
system
(
"rm -rf ./res.txt"
)
os
.
system
(
"rm -rf ./*.py.sql"
)
os
.
system
(
"rm -rf ./taosdemoTestNanoCreateDB.sql"
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoQuery.json
已删除
100644 → 0
浏览文件 @
28c644b7
{
"filetype"
:
"query"
,
"cfgdir"
:
"/etc/taos"
,
"host"
:
"127.0.0.1"
,
"port"
:
6030
,
"user"
:
"root"
,
"password"
:
"taosdata"
,
"confirm_parameter_prompt"
:
"no"
,
"databases"
:
"nsdb"
,
"query_times"
:
10
,
"query_mode"
:
"taosc"
,
"specified_table_query"
:
{
"query_interval"
:
1
,
"concurrent"
:
2
,
"sqls"
:
[
{
"sql"
:
"select count(*) from stb0 where ts>
\"
2021-07-01 00:01:00.000000000
\"
;"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select count(*) from stb0 where ts>
\"
2021-07-01 00:01:00.000000000
\"
and ts <=
\"
2021-07-01 00:01:10.000000000
\"
;"
,
"result"
:
"./query_res1.txt"
},
{
"sql"
:
"select count(*) from stb0 where ts>now-20d ;"
,
"result"
:
"./query_res2.txt"
},
{
"sql"
:
"select max(c10) from stb0;"
,
"result"
:
"./query_res3.txt"
},
{
"sql"
:
"select min(c1) from stb0;"
,
"result"
:
"./query_res4.txt"
},
{
"sql"
:
"select avg(c1) from stb0;"
,
"result"
:
"./query_res5.txt"
},
{
"sql"
:
"select count(*) from stb0 group by tbname;"
,
"result"
:
"./query_res6.txt"
}
]
},
"super_table_query"
:
{
"stblname"
:
"stb0"
,
"query_interval"
:
0
,
"threads"
:
4
,
"sqls"
:
[
{
"sql"
:
"select count(*) from xxxx where ts>
\"
2021-07-01 00:01:00.000000000
\"
;"
,
"result"
:
"./query_res_tb0.txt"
},
{
"sql"
:
"select count(*) from xxxx where ts>
\"
2021-07-01 00:01:00.000000000
\"
and ts <=
\"
2021-07-01 00:01:10.000000000
\"
;"
,
"result"
:
"./query_res_tb1.txt"
},
{
"sql"
:
"select first(*) from xxxx ;"
,
"result"
:
"./query_res_tb2.txt"
},
{
"sql"
:
"select last(*) from xxxx;"
,
"result"
:
"./query_res_tb3.txt"
},
{
"sql"
:
"select last_row(*) from xxxx ;"
,
"result"
:
"./query_res_tb4.txt"
},
{
"sql"
:
"select max(c10) from xxxx ;"
,
"result"
:
"./query_res_tb5.txt"
},
{
"sql"
:
"select min(c1) from xxxx ;"
,
"result"
:
"./query_res_tb6.txt"
},
{
"sql"
:
"select avg(c10) from xxxx ;"
,
"result"
:
"./query_res_tb7.txt"
}
]
}
}
\ No newline at end of file
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoQuery.py
已删除
100644 → 0
浏览文件 @
28c644b7
###################################################################
# 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
*
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 test for nanoSecond with where and max min groupby order
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/taosdemoTestNanoDatabase.json -y "
%
binPath
)
tdSql
.
execute
(
"use nsdb"
)
# use where to filter
tdSql
.
query
(
"select count(*) from stb0 where ts>
\"
2021-07-01 00:00:00.590000000
\"
"
)
tdSql
.
checkData
(
0
,
0
,
4000
)
tdSql
.
query
(
"select count(*) from stb0 where ts>
\"
2021-07-01 00:00:00.000000000
\"
and ts <=
\"
2021-07-01 00:00:00.590000000
\"
"
)
tdSql
.
checkData
(
0
,
0
,
5900
)
tdSql
.
query
(
"select count(*) from tb0_0 where ts>
\"
2021-07-01 00:00:00.590000000
\"
;"
)
tdSql
.
checkData
(
0
,
0
,
40
)
tdSql
.
query
(
"select count(*) from tb0_0 where ts>
\"
2021-07-01 00:00:00.000000000
\"
and ts <=
\"
2021-07-01 00:00:00.590000000
\"
"
)
tdSql
.
checkData
(
0
,
0
,
59
)
# select max min avg from special col
tdSql
.
query
(
"select max(c10) from stb0;"
)
print
(
"select max(c10) from stb0 : "
,
tdSql
.
getData
(
0
,
0
))
tdSql
.
query
(
"select max(c10) from tb0_0;"
)
print
(
"select max(c10) from tb0_0 : "
,
tdSql
.
getData
(
0
,
0
))
tdSql
.
query
(
"select min(c1) from stb0;"
)
print
(
"select min(c1) from stb0 : "
,
tdSql
.
getData
(
0
,
0
))
tdSql
.
query
(
"select min(c1) from tb0_0;"
)
print
(
"select min(c1) from tb0_0 : "
,
tdSql
.
getData
(
0
,
0
))
tdSql
.
query
(
"select avg(c1) from stb0;"
)
print
(
"select avg(c1) from stb0 : "
,
tdSql
.
getData
(
0
,
0
))
tdSql
.
query
(
"select avg(c1) from tb0_0;"
)
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
)
tdSql
.
checkData
(
10
,
0
,
100
)
# query : query above sqls by taosdemo and continuously
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/taosdemoTestSupportNanoQuery.json -y "
%
binPath
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/taosdemoTestNanoDatabasecsv.json -y "
%
binPath
)
tdSql
.
execute
(
"use nsdbcsv"
)
tdSql
.
query
(
"show stables"
)
tdSql
.
checkData
(
0
,
4
,
100
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
10000
)
tdSql
.
query
(
"describe stb0"
)
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 -1d-1h-3s"
)
tdSql
.
checkData
(
0
,
0
,
10000
)
tdSql
.
query
(
"select count(*) from stb0 where ts < 1626918583000000000"
)
tdSql
.
checkData
(
0
,
0
,
10000
)
tdSql
.
execute
(
'select count(*) from stb0 where c2 > 162687012800000000'
)
tdSql
.
execute
(
'select count(*) from stb0 where c2 < 162687012800000000'
)
tdSql
.
execute
(
'select count(*) from stb0 where c2 = 162687012800000000'
)
tdSql
.
execute
(
'select count(*) from stb0 where c2 != 162687012800000000'
)
tdSql
.
execute
(
'select count(*) from stb0 where c2 <> 162687012800000000'
)
tdSql
.
execute
(
'select count(*) from stb0 where c2 > "2021-07-21 20:22:08.248246976"'
)
tdSql
.
execute
(
'select count(*) from stb0 where c2 < "2021-07-21 20:22:08.248246976"'
)
tdSql
.
execute
(
'select count(*) from stb0 where c2 = "2021-07-21 20:22:08.248246976"'
)
tdSql
.
execute
(
'select count(*) from stb0 where c2 != "2021-07-21 20:22:08.248246976"'
)
tdSql
.
execute
(
'select count(*) from stb0 where c2 <> "2021-07-21 20:22:08.248246976"'
)
tdSql
.
execute
(
'select count(*) from stb0 where ts between "2021-07-01 00:00:00.000000000" and "2021-07-01 00:00:00.990000000"'
)
tdSql
.
execute
(
'select count(*) from stb0 where ts between 1625068800000000000 and 1625068801000000000'
)
tdSql
.
query
(
'select avg(c0) from stb0 interval(5000000000b)'
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
'select avg(c0) from stb0 interval(100000000b)'
)
tdSql
.
checkRows
(
10
)
tdSql
.
error
(
'select avg(c0) from stb0 interval(1b)'
)
tdSql
.
error
(
'select avg(c0) from stb0 interval(999b)'
)
tdSql
.
query
(
'select avg(c0) from stb0 interval(1000b)'
)
tdSql
.
checkRows
(
100
)
tdSql
.
query
(
'select avg(c0) from stb0 interval(1u)'
)
tdSql
.
checkRows
(
100
)
tdSql
.
query
(
'select avg(c0) from stb0 interval(100000000b) sliding (100000000b)'
)
tdSql
.
checkRows
(
10
)
# query : query above sqls by taosdemo and continuously
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/taosdemoTestSupportNanoQuerycsv.json -y "
%
binPath
)
os
.
system
(
"rm -rf ./query_res*.txt*"
)
os
.
system
(
"rm -rf tools/taosdemoAllTest/*.py.sql"
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoQuerycsv.json
已删除
100644 → 0
浏览文件 @
28c644b7
{
"filetype"
:
"query"
,
"cfgdir"
:
"/etc/taos"
,
"host"
:
"127.0.0.1"
,
"port"
:
6030
,
"user"
:
"root"
,
"password"
:
"taosdata"
,
"confirm_parameter_prompt"
:
"no"
,
"databases"
:
"nsdbcsv"
,
"query_times"
:
10
,
"query_mode"
:
"taosc"
,
"specified_table_query"
:
{
"query_interval"
:
1
,
"concurrent"
:
2
,
"sqls"
:
[
{
"sql"
:
"select count(*) from stb0 where ts>
\"
2021-07-01 00:00:00.490000000
\"
;"
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select count(*) from stb0 where ts < now -22d-1h-3s ;"
,
"result"
:
"./query_res1.txt"
},
{
"sql"
:
"select count(*) from stb0 where ts < 1626918583000000000 ;"
,
"result"
:
"./query_res2.txt"
},
{
"sql"
:
"select count(*) from stb0 where c2 <> 162687012800000000';"
,
"result"
:
"./query_res3.txt"
},
{
"sql"
:
"select count(*) from stb0 where c2 !=
\"
2021-07-21 20:22:08.248246976
\"
;"
,
"result"
:
"./query_res4.txt"
},
{
"sql"
:
"select count(*) from stb0 where ts between
\"
2021-07-01 00:00:00.000000000
\"
and
\"
2021-07-01 00:00:00.990000000
\"
;"
,
"result"
:
"./query_res5.txt"
},
{
"sql"
:
"select count(*) from stb0 group by tbname;"
,
"result"
:
"./query_res6.txt"
},
{
"sql"
:
"select count(*) from stb0 where ts between 1625068800000000000 and 1625068801000000000;"
,
"result"
:
"./query_res7.txt"
},
{
"sql"
:
"select avg(c0) from stb0 interval(5000000000b);"
,
"result"
:
"./query_res8.txt"
},
{
"sql"
:
"select avg(c0) from stb0 interval(100000000b) sliding (100000000b);"
,
"result"
:
"./query_res9.txt"
}
]
},
"super_table_query"
:
{
"stblname"
:
"stb0"
,
"query_interval"
:
0
,
"threads"
:
4
,
"sqls"
:
[
{
"sql"
:
"select count(*) from xxxx where ts >
\"
2021-07-01 00:00:00.490000000
\"
;"
,
"result"
:
"./query_res_tb0.txt"
},
{
"sql"
:
"select count(*) from xxxx where ts between
\"
2021-07-01 00:00:00.000000000
\"
and
\"
2021-07-01 00:00:00.990000000
\"
;"
,
"result"
:
"./query_res_tb1.txt"
},
{
"sql"
:
"select first(*) from xxxx ;"
,
"result"
:
"./query_res_tb2.txt"
},
{
"sql"
:
"select last(*) from xxxx;"
,
"result"
:
"./query_res_tb3.txt"
},
{
"sql"
:
"select last_row(*) from xxxx ;"
,
"result"
:
"./query_res_tb4.txt"
},
{
"sql"
:
"select max(c0) from xxxx ;"
,
"result"
:
"./query_res_tb5.txt"
},
{
"sql"
:
"select min(c0) from xxxx ;"
,
"result"
:
"./query_res_tb6.txt"
},
{
"sql"
:
"select avg(c0) from xxxx ;"
,
"result"
:
"./query_res_tb7.txt"
},
{
"sql"
:
"select avg(c0) from xxxx interval(100000000b) sliding (100000000b) ;"
,
"result"
:
"./query_res_tb8.txt"
}
]
}
}
\ No newline at end of file
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoSubscribe.json
已删除
100644 → 0
浏览文件 @
28c644b7
{
"filetype"
:
"subscribe"
,
"cfgdir"
:
"/etc/taos"
,
"host"
:
"127.0.0.1"
,
"port"
:
6030
,
"user"
:
"root"
,
"password"
:
"taosdata"
,
"databases"
:
"subnsdb"
,
"confirm_parameter_prompt"
:
"no"
,
"specified_table_query"
:
{
"concurrent"
:
2
,
"mode"
:
"sync"
,
"interval"
:
10000
,
"restart"
:
"yes"
,
"keepProgress"
:
"yes"
,
"sqls"
:
[
{
"sql"
:
"select * from stb0 where ts>=
\"
2021-07-01 00:00:00.000000000
\"
;"
,
"result"
:
"./subscribe_res0.txt"
},
{
"sql"
:
"select * from stb0 where ts < now -2d-1h-3s ;"
,
"result"
:
"./subscribe_res1.txt"
},
{
"sql"
:
"select * from stb0 where ts < 1626918583000000000 ;"
,
"result"
:
"./subscribe_res2.txt"
}]
}
}
tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanosubscribe.py
已删除
100644 → 0
浏览文件 @
28c644b7
###################################################################
# 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
import
subprocess
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
# get the number of subscriptions
def
subTimes
(
self
,
filename
):
self
.
filename
=
filename
command
=
'cat %s |wc -l'
%
filename
times
=
int
(
subprocess
.
getstatusoutput
(
command
)[
1
])
return
times
# assert results
def
assertCheck
(
self
,
filename
,
subResult
,
expectResult
):
self
.
filename
=
filename
self
.
subResult
=
subResult
self
.
expectResult
=
expectResult
args0
=
(
filename
,
subResult
,
expectResult
)
assert
subResult
==
expectResult
,
"Queryfile:%s ,result is %s != expect: %s"
%
args0
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/"
# clear env
os
.
system
(
"ps -ef |grep 'taosdemoAllTest/taosdemoTestSupportNanoSubscribe.json' |grep -v 'grep' |awk '{print $2}'|xargs kill -9"
)
os
.
system
(
"rm -rf ./subscribe_res*"
)
os
.
system
(
"rm -rf ./all_subscribe_res*"
)
# insert data
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/taosdemoTestNanoDatabaseInsertForSub.json"
%
binPath
)
os
.
system
(
"nohup %staosdemo -f tools/taosdemoAllTest/taosdemoTestSupportNanoSubscribe.json &"
%
binPath
)
query_pid
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep "taosdemoAllTest/taosdemoTestSupportNanoSubscribe.json" |grep -v "grep"|awk
\'
{print $2}
\'
'
)[
1
])
# merge result files
sleep
(
5
)
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"
)
# correct subscribeTimes testcase
subTimes0
=
self
.
subTimes
(
"all_subscribe_res0.txt"
)
self
.
assertCheck
(
"all_subscribe_res0.txt"
,
subTimes0
,
200
)
subTimes1
=
self
.
subTimes
(
"all_subscribe_res1.txt"
)
self
.
assertCheck
(
"all_subscribe_res1.txt"
,
subTimes1
,
200
)
subTimes2
=
self
.
subTimes
(
"all_subscribe_res2.txt"
)
self
.
assertCheck
(
"all_subscribe_res2.txt"
,
subTimes2
,
200
)
# insert extral data
tdSql
.
execute
(
"use subnsdb"
)
tdSql
.
execute
(
"insert into tb0_0 values(now,100.1000,'subtest1',now-1s)"
)
sleep
(
15
)
os
.
system
(
"cat subscribe_res0.txt* > all_subscribe_res0.txt"
)
subTimes0
=
self
.
subTimes
(
"all_subscribe_res0.txt"
)
self
.
assertCheck
(
"all_subscribe_res0.txt"
,
subTimes0
,
202
)
# correct data testcase
os
.
system
(
"kill -9 %d"
%
query_pid
)
sleep
(
3
)
os
.
system
(
"rm -rf ./subscribe_res*"
)
os
.
system
(
"rm -rf ./all_subscribe*"
)
os
.
system
(
"rm -rf ./*.py.sql"
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/tools/taosdemoTest.py
浏览文件 @
90029476
...
@@ -51,7 +51,7 @@ class TDTestCase:
...
@@ -51,7 +51,7 @@ class TDTestCase:
else
:
else
:
tdLog
.
info
(
"taosdemo found in %s"
%
buildPath
)
tdLog
.
info
(
"taosdemo found in %s"
%
buildPath
)
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
os
.
system
(
"%staos
demo
-y -t %d -n %d -b INT,INT,INT,INT"
%
os
.
system
(
"%staos
Benchmark
-y -t %d -n %d -b INT,INT,INT,INT"
%
(
binPath
,
self
.
numberOfTables
,
self
.
numberOfRecords
))
(
binPath
,
self
.
numberOfTables
,
self
.
numberOfRecords
))
tdSql
.
execute
(
"use test"
)
tdSql
.
execute
(
"use test"
)
...
...
tests/pytest/tools/taosdemoTestInterlace.py
浏览文件 @
90029476
...
@@ -49,7 +49,7 @@ class TDTestCase:
...
@@ -49,7 +49,7 @@ class TDTestCase:
else
:
else
:
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
taosdemoCmd
=
"%staos
demo
-f tools/insert-interlace.json -PP 2>&1 | grep sleep | wc -l"
%
binPath
taosdemoCmd
=
"%staos
Benchmark
-f tools/insert-interlace.json -PP 2>&1 | grep sleep | wc -l"
%
binPath
sleepTimes
=
subprocess
.
check_output
(
sleepTimes
=
subprocess
.
check_output
(
taosdemoCmd
,
shell
=
True
).
decode
(
"utf-8"
)
taosdemoCmd
,
shell
=
True
).
decode
(
"utf-8"
)
print
(
"sleep times: %d"
%
int
(
sleepTimes
))
print
(
"sleep times: %d"
%
int
(
sleepTimes
))
...
...
tests/pytest/tools/taosdemoTestLimitOffset.py
浏览文件 @
90029476
...
@@ -51,8 +51,8 @@ class TDTestCase:
...
@@ -51,8 +51,8 @@ class TDTestCase:
else
:
else
:
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
os
.
system
(
"%staos
demo
-f tools/insert-tblimit-tboffset-createdb.json"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/insert-tblimit-tboffset-createdb.json"
%
binPath
)
os
.
system
(
"%staos
demo
-f tools/insert-tblimit-tboffset-insertrec.json"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/insert-tblimit-tboffset-insertrec.json"
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count(tbname) from db.stb"
)
tdSql
.
query
(
"select count(tbname) from db.stb"
)
...
@@ -60,8 +60,8 @@ class TDTestCase:
...
@@ -60,8 +60,8 @@ class TDTestCase:
tdSql
.
query
(
"select count(*) from db.stb"
)
tdSql
.
query
(
"select count(*) from db.stb"
)
tdSql
.
checkData
(
0
,
0
,
33000
)
tdSql
.
checkData
(
0
,
0
,
33000
)
os
.
system
(
"%staos
demo
-f tools/insert-tblimit-tboffset-createdb.json"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/insert-tblimit-tboffset-createdb.json"
%
binPath
)
os
.
system
(
"%staos
demo
-f tools/insert-tblimit-tboffset0.json"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/insert-tblimit-tboffset0.json"
%
binPath
)
tdSql
.
execute
(
"reset query cache"
)
tdSql
.
execute
(
"reset query cache"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
...
@@ -70,8 +70,8 @@ class TDTestCase:
...
@@ -70,8 +70,8 @@ class TDTestCase:
tdSql
.
query
(
"select count(*) from db.stb"
)
tdSql
.
query
(
"select count(*) from db.stb"
)
tdSql
.
checkData
(
0
,
0
,
20000
)
tdSql
.
checkData
(
0
,
0
,
20000
)
os
.
system
(
"%staos
demo
-f tools/insert-tblimit-tboffset-createdb.json"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/insert-tblimit-tboffset-createdb.json"
%
binPath
)
os
.
system
(
"%staos
demo
-f tools/insert-tblimit1-tboffset.json"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/insert-tblimit1-tboffset.json"
%
binPath
)
tdSql
.
execute
(
"reset query cache"
)
tdSql
.
execute
(
"reset query cache"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
...
...
tests/pytest/tools/taosdemoTestQuery.py
浏览文件 @
90029476
...
@@ -53,12 +53,12 @@ class TDTestCase:
...
@@ -53,12 +53,12 @@ class TDTestCase:
else
:
else
:
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
os
.
system
(
"%staos
demo
-y -t %d -n %d"
%
os
.
system
(
"%staos
Benchmark
-y -t %d -n %d"
%
(
binPath
,
self
.
numberOfTables
,
self
.
numberOfRecords
))
(
binPath
,
self
.
numberOfTables
,
self
.
numberOfRecords
))
print
(
"Sleep 2 seconds.."
)
print
(
"Sleep 2 seconds.."
)
time
.
sleep
(
2
)
time
.
sleep
(
2
)
os
.
system
(
'%staos
demo
-f tools/query.json '
%
binPath
)
os
.
system
(
'%staos
Benchmark
-f tools/query.json '
%
binPath
)
# taosdemoCmd = '%staos
demo
-f tools/query.json ' % binPath
# taosdemoCmd = '%staos
Benchmark
-f tools/query.json ' % binPath
# threads = subprocess.check_output(
# threads = subprocess.check_output(
# taosdemoCmd, shell=True).decode("utf-8")
# taosdemoCmd, shell=True).decode("utf-8")
# print("threads: %d" % int(threads))
# print("threads: %d" % int(threads))
...
...
tests/pytest/tools/taosdemoTestSampleData.py
浏览文件 @
90029476
...
@@ -51,7 +51,7 @@ class TDTestCase:
...
@@ -51,7 +51,7 @@ class TDTestCase:
else
:
else
:
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
os
.
system
(
"%staos
demo
-f tools/taosdemo-sampledata.json"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/taosdemo-sampledata.json"
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count(tbname) from db.stb"
)
tdSql
.
query
(
"select count(tbname) from db.stb"
)
...
...
tests/pytest/tools/taosdemoTestTblAlt.py
浏览文件 @
90029476
...
@@ -54,9 +54,9 @@ class TDTestCase:
...
@@ -54,9 +54,9 @@ class TDTestCase:
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
if
(
threadID
==
0
):
if
(
threadID
==
0
):
print
(
"%staos
demo
-y -t %d -n %d -b INT,INT,INT,INT"
%
print
(
"%staos
Benchmark
-y -t %d -n %d -b INT,INT,INT,INT"
%
(
binPath
,
self
.
numberOfTables
,
self
.
numberOfRecords
))
(
binPath
,
self
.
numberOfTables
,
self
.
numberOfRecords
))
os
.
system
(
"%staos
demo
-y -t %d -n %d -b INT,INT,INT,INT"
%
os
.
system
(
"%staos
Benchmark
-y -t %d -n %d -b INT,INT,INT,INT"
%
(
binPath
,
self
.
numberOfTables
,
self
.
numberOfRecords
))
(
binPath
,
self
.
numberOfTables
,
self
.
numberOfRecords
))
if
(
threadID
==
1
):
if
(
threadID
==
1
):
time
.
sleep
(
2
)
time
.
sleep
(
2
)
...
...
tests/pytest/tools/taosdemoTestWithJson.py
浏览文件 @
90029476
...
@@ -48,7 +48,7 @@ class TDTestCase:
...
@@ -48,7 +48,7 @@ class TDTestCase:
else
:
else
:
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
os
.
system
(
"%staos
demo
-f tools/insert.json -y"
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tools/insert.json -y"
%
binPath
)
tdSql
.
execute
(
"use db01"
)
tdSql
.
execute
(
"use db01"
)
tdSql
.
query
(
"select count(*) from stb01"
)
tdSql
.
query
(
"select count(*) from stb01"
)
...
...
tests/pytest/tools/taosdemoTestWithoutMetric.py
浏览文件 @
90029476
...
@@ -50,7 +50,7 @@ class TDTestCase:
...
@@ -50,7 +50,7 @@ class TDTestCase:
else
:
else
:
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
os
.
system
(
"%staos
demo
-N -y -t %d -n %d"
%
os
.
system
(
"%staos
Benchmark
-N -y -t %d -n %d"
%
(
binPath
,
self
.
numberOfTables
,
self
.
numberOfRecords
))
(
binPath
,
self
.
numberOfTables
,
self
.
numberOfRecords
))
tdSql
.
query
(
"show databases"
)
tdSql
.
query
(
"show databases"
)
...
...
tests/pytest/tools/taosdemoTestdatatype.py
浏览文件 @
90029476
...
@@ -50,7 +50,7 @@ class TDTestCase:
...
@@ -50,7 +50,7 @@ class TDTestCase:
tdLog
.
info
(
"taosdemo found in %s"
%
buildPath
)
tdLog
.
info
(
"taosdemo found in %s"
%
buildPath
)
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
os
.
system
(
"%staos
demo
-d test002 -y -t %d -n %d -b INT,nchar
\\
(8
\\
),binary
\\
(16
\\
),binary,nchar -w 8"
%
os
.
system
(
"%staos
Benchmark
-d test002 -y -t %d -n %d -b INT,nchar
\\
(8
\\
),binary
\\
(16
\\
),binary,nchar -w 8"
%
(
binPath
,
self
.
numberOfTables
,
self
.
numberOfRecords
))
(
binPath
,
self
.
numberOfTables
,
self
.
numberOfRecords
))
tdSql
.
execute
(
'use test002'
)
tdSql
.
execute
(
'use test002'
)
...
@@ -68,7 +68,7 @@ class TDTestCase:
...
@@ -68,7 +68,7 @@ class TDTestCase:
tdSql
.
error
(
'insert into d1 values(now,100,"abcd","abcd"'
)
tdSql
.
error
(
'insert into d1 values(now,100,"abcd","abcd"'
)
tdSql
.
error
(
'insert into d1 values(now,100,100,100)'
)
tdSql
.
error
(
'insert into d1 values(now,100,100,100)'
)
os
.
system
(
"%staos
demo
-d test002 -y -t %d -n %d --data-type INT,nchar
\\
(8
\\
),binary
\\
(16
\\
),binary,nchar -w 8"
%
os
.
system
(
"%staos
Benchmark
-d test002 -y -t %d -n %d --data-type INT,nchar
\\
(8
\\
),binary
\\
(16
\\
),binary,nchar -w 8"
%
(
binPath
,
self
.
numberOfTables
,
self
.
numberOfRecords
))
(
binPath
,
self
.
numberOfTables
,
self
.
numberOfRecords
))
tdSql
.
execute
(
'use test002'
)
tdSql
.
execute
(
'use test002'
)
...
@@ -76,7 +76,7 @@ class TDTestCase:
...
@@ -76,7 +76,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
self
.
numberOfTables
*
self
.
numberOfRecords
)
tdSql
.
checkData
(
0
,
0
,
self
.
numberOfTables
*
self
.
numberOfRecords
)
os
.
system
(
"%staos
demo
-d test002 -y -t %d -n %d -bINT,nchar
\\
(8
\\
),binary
\\
(16
\\
),binary,nchar -w 8"
%
os
.
system
(
"%staos
Benchmark
-d test002 -y -t %d -n %d -bINT,nchar
\\
(8
\\
),binary
\\
(16
\\
),binary,nchar -w 8"
%
(
binPath
,
self
.
numberOfTables
,
self
.
numberOfRecords
))
(
binPath
,
self
.
numberOfTables
,
self
.
numberOfRecords
))
tdSql
.
execute
(
'use test002'
)
tdSql
.
execute
(
'use test002'
)
...
...
tests/pytest/tsdb/tsdbComp.py
浏览文件 @
90029476
...
@@ -59,11 +59,11 @@ class TDTestCase:
...
@@ -59,11 +59,11 @@ class TDTestCase:
#new db and insert data
#new db and insert data
tdSql
.
execute
(
"drop database if exists db2"
)
tdSql
.
execute
(
"drop database if exists db2"
)
os
.
system
(
"%staos
demo
-f tsdb/insertDataDb1.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tsdb/insertDataDb1.json -y "
%
binPath
)
tdSql
.
execute
(
"drop database if exists db1"
)
tdSql
.
execute
(
"drop database if exists db1"
)
os
.
system
(
"%staos
demo
-f tsdb/insertDataDb2.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tsdb/insertDataDb2.json -y "
%
binPath
)
tdSql
.
execute
(
"drop table if exists db2.stb0"
)
tdSql
.
execute
(
"drop table if exists db2.stb0"
)
os
.
system
(
"%staos
demo
-f tsdb/insertDataDb2Newstab.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tsdb/insertDataDb2Newstab.json -y "
%
binPath
)
tdSql
.
execute
(
"use db2"
)
tdSql
.
execute
(
"use db2"
)
tdSql
.
execute
(
"drop table if exists stb1_0"
)
tdSql
.
execute
(
"drop table if exists stb1_0"
)
...
...
tests/pytest/tsdb/tsdbCompCluster.py
浏览文件 @
90029476
...
@@ -66,11 +66,11 @@ class TwoClients:
...
@@ -66,11 +66,11 @@ class TwoClients:
# new db ,new super tables , child tables, and insert data
# new db ,new super tables , child tables, and insert data
tdSql
.
execute
(
"drop database if exists db2"
)
tdSql
.
execute
(
"drop database if exists db2"
)
os
.
system
(
"%staos
demo
-f tsdb/insertDataDb1.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tsdb/insertDataDb1.json -y "
%
binPath
)
tdSql
.
execute
(
"drop database if exists db1"
)
tdSql
.
execute
(
"drop database if exists db1"
)
os
.
system
(
"%staos
demo
-f tsdb/insertDataDb2.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tsdb/insertDataDb2.json -y "
%
binPath
)
tdSql
.
execute
(
"drop table if exists db2.stb0"
)
tdSql
.
execute
(
"drop table if exists db2.stb0"
)
os
.
system
(
"%staos
demo
-f tsdb/insertDataDb2Newstab.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tsdb/insertDataDb2Newstab.json -y "
%
binPath
)
# new general tables and modify general tables;
# new general tables and modify general tables;
tdSql
.
execute
(
"use db2"
)
tdSql
.
execute
(
"use db2"
)
...
...
tests/pytest/tsdb/tsdbCompClusterReplica2.py
浏览文件 @
90029476
...
@@ -65,11 +65,11 @@ class TwoClients:
...
@@ -65,11 +65,11 @@ class TwoClients:
# new db ,new super tables , child tables, and insert data
# new db ,new super tables , child tables, and insert data
tdSql
.
execute
(
"drop database if exists db2"
)
tdSql
.
execute
(
"drop database if exists db2"
)
os
.
system
(
"%staos
demo
-f tsdb/insertDataDb1Replica2.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tsdb/insertDataDb1Replica2.json -y "
%
binPath
)
tdSql
.
execute
(
"drop database if exists db1"
)
tdSql
.
execute
(
"drop database if exists db1"
)
os
.
system
(
"%staos
demo
-f tsdb/insertDataDb2Replica2.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tsdb/insertDataDb2Replica2.json -y "
%
binPath
)
tdSql
.
execute
(
"drop table if exists db2.stb0"
)
tdSql
.
execute
(
"drop table if exists db2.stb0"
)
os
.
system
(
"%staos
demo
-f tsdb/insertDataDb2NewstabReplica2.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f tsdb/insertDataDb2NewstabReplica2.json -y "
%
binPath
)
# new general tables and modify general tables;
# new general tables and modify general tables;
tdSql
.
execute
(
"use db2"
)
tdSql
.
execute
(
"use db2"
)
...
...
tests/pytest/wal/sdbComp.py
浏览文件 @
90029476
...
@@ -61,11 +61,11 @@ class TDTestCase:
...
@@ -61,11 +61,11 @@ class TDTestCase:
os
.
system
(
"rm -rf %s/sim/dnode1/data/mnode_tmp/"
%
testPath
)
os
.
system
(
"rm -rf %s/sim/dnode1/data/mnode_tmp/"
%
testPath
)
os
.
system
(
"rm -rf %s/sim/dnode1/data/mnode_bak/"
%
testPath
)
os
.
system
(
"rm -rf %s/sim/dnode1/data/mnode_bak/"
%
testPath
)
tdSql
.
execute
(
"drop database if exists db2"
)
tdSql
.
execute
(
"drop database if exists db2"
)
os
.
system
(
"%staos
demo
-f wal/insertDataDb1.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f wal/insertDataDb1.json -y "
%
binPath
)
tdSql
.
execute
(
"drop database if exists db1"
)
tdSql
.
execute
(
"drop database if exists db1"
)
os
.
system
(
"%staos
demo
-f wal/insertDataDb2.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f wal/insertDataDb2.json -y "
%
binPath
)
tdSql
.
execute
(
"drop table if exists db2.stb0"
)
tdSql
.
execute
(
"drop table if exists db2.stb0"
)
os
.
system
(
"%staos
demo
-f wal/insertDataDb2Newstab.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f wal/insertDataDb2Newstab.json -y "
%
binPath
)
query_pid1
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep taosd |grep -v "grep"|awk
\'
{print $2}
\'
'
)[
1
])
query_pid1
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep taosd |grep -v "grep"|awk
\'
{print $2}
\'
'
)[
1
])
print
(
query_pid1
)
print
(
query_pid1
)
tdSql
.
execute
(
"use db2"
)
tdSql
.
execute
(
"use db2"
)
...
...
tests/pytest/wal/sdbCompCluster.py
浏览文件 @
90029476
...
@@ -66,11 +66,11 @@ class TwoClients:
...
@@ -66,11 +66,11 @@ class TwoClients:
os
.
system
(
"rm -rf /var/lib/taos/mnode_bak/"
)
os
.
system
(
"rm -rf /var/lib/taos/mnode_bak/"
)
os
.
system
(
"rm -rf /var/lib/taos/mnode_temp/"
)
os
.
system
(
"rm -rf /var/lib/taos/mnode_temp/"
)
tdSql
.
execute
(
"drop database if exists db2"
)
tdSql
.
execute
(
"drop database if exists db2"
)
os
.
system
(
"%staos
demo
-f wal/insertDataDb1.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f wal/insertDataDb1.json -y "
%
binPath
)
tdSql
.
execute
(
"drop database if exists db1"
)
tdSql
.
execute
(
"drop database if exists db1"
)
os
.
system
(
"%staos
demo
-f wal/insertDataDb2.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f wal/insertDataDb2.json -y "
%
binPath
)
tdSql
.
execute
(
"drop table if exists db2.stb0"
)
tdSql
.
execute
(
"drop table if exists db2.stb0"
)
os
.
system
(
"%staos
demo
-f wal/insertDataDb2Newstab.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f wal/insertDataDb2Newstab.json -y "
%
binPath
)
query_pid1
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep taosd |grep -v "grep"|awk
\'
{print $2}
\'
'
)[
1
])
query_pid1
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep taosd |grep -v "grep"|awk
\'
{print $2}
\'
'
)[
1
])
print
(
query_pid1
)
print
(
query_pid1
)
tdSql
.
execute
(
"use db2"
)
tdSql
.
execute
(
"use db2"
)
...
...
tests/pytest/wal/sdbCompClusterReplica2.py
浏览文件 @
90029476
...
@@ -66,11 +66,11 @@ class TwoClients:
...
@@ -66,11 +66,11 @@ class TwoClients:
os
.
system
(
"rm -rf /var/lib/taos/mnode_bak/"
)
os
.
system
(
"rm -rf /var/lib/taos/mnode_bak/"
)
os
.
system
(
"rm -rf /var/lib/taos/mnode_temp/"
)
os
.
system
(
"rm -rf /var/lib/taos/mnode_temp/"
)
tdSql
.
execute
(
"drop database if exists db2"
)
tdSql
.
execute
(
"drop database if exists db2"
)
os
.
system
(
"%staos
demo
-f wal/insertDataDb1Replica2.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f wal/insertDataDb1Replica2.json -y "
%
binPath
)
tdSql
.
execute
(
"drop database if exists db1"
)
tdSql
.
execute
(
"drop database if exists db1"
)
os
.
system
(
"%staos
demo
-f wal/insertDataDb2Replica2.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f wal/insertDataDb2Replica2.json -y "
%
binPath
)
tdSql
.
execute
(
"drop table if exists db2.stb0"
)
tdSql
.
execute
(
"drop table if exists db2.stb0"
)
os
.
system
(
"%staos
demo
-f wal/insertDataDb2NewstabReplica2.json -y "
%
binPath
)
os
.
system
(
"%staos
Benchmark
-f wal/insertDataDb2NewstabReplica2.json -y "
%
binPath
)
query_pid1
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep taosd |grep -v "grep"|awk
\'
{print $2}
\'
'
)[
1
])
query_pid1
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep taosd |grep -v "grep"|awk
\'
{print $2}
\'
'
)[
1
])
print
(
query_pid1
)
print
(
query_pid1
)
tdSql
.
execute
(
"use db2"
)
tdSql
.
execute
(
"use db2"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录