Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f3c70621
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
f3c70621
编写于
12月 17, 2021
作者:
haoranc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-11094]<test>:add taosdemo shell test case
上级
03459917
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
136 addition
and
136 deletion
+136
-136
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertShell.py
...s/pytest/tools/taosdemoAllTest/taosdemoTestInsertShell.py
+136
-136
未找到文件。
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertShell.py
浏览文件 @
f3c70621
...
@@ -54,152 +54,152 @@ class TDTestCase:
...
@@ -54,152 +54,152 @@ class TDTestCase:
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
tdLog
.
info
(
"taosd found in %s"
%
buildPath
)
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
#
tdLog.info("create super table")
tdLog
.
info
(
"create super table"
)
#
#
create super table
# create super table
#
os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(15\) -w 4096 \
os
.
system
(
"%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(15\) -w 4096
\
#
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. " % (binPath,cfgPath))
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. "
%
(
binPath
,
cfgPath
))
#
tdSql.execute("use db1")
tdSql
.
execute
(
"use db1"
)
#
tdSql.query("describe meters;")
tdSql
.
query
(
"describe meters;"
)
#
tdSql.checkRows(13)
tdSql
.
checkRows
(
13
)
#
tdSql.query("select count(*) from meters")
tdSql
.
query
(
"select count(*) from meters"
)
#
tdSql.checkData(0, 0, 1000)
tdSql
.
checkData
(
0
,
0
,
1000
)
#
tdSql.query("select count(tbname) from meters")
tdSql
.
query
(
"select count(tbname) from meters"
)
#
tdSql.checkData(0, 0, 10)
tdSql
.
checkData
(
0
,
0
,
10
)
#
tdSql.query("select count(*) from `test.0`")
tdSql
.
query
(
"select count(*) from `test.0`"
)
#
tdSql.checkData(0, 0, 100)
tdSql
.
checkData
(
0
,
0
,
100
)
# tdLog.info("create general table -N ")
tdLog
.
info
(
"create general table -N "
)
# tdSql.execute("drop database db1;")
tdSql
.
execute
(
"drop database db1;"
)
# # create general table -N
# create general table -N
# os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(15\) -w 4096 \
os
.
system
(
"%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(15\) -w 4096
\
# -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -N " % (binPath,cfgPath))
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -N "
%
(
binPath
,
cfgPath
))
# tdSql.execute("use db1")
tdSql
.
execute
(
"use db1"
)
# tdSql.query("describe `test.0`;")
tdSql
.
query
(
"describe `test.0`;"
)
# tdSql.checkRows(11)
tdSql
.
checkRows
(
11
)
# tdSql.error("select count(*) from meters")
tdSql
.
error
(
"select count(*) from meters"
)
# tdSql.error("select count(tbname) from meters")
tdSql
.
error
(
"select count(tbname) from meters"
)
# tdSql.query("select count(*) from `test.0`")
tdSql
.
query
(
"select count(*) from `test.0`"
)
# tdSql.checkData(0, 0, 100)
tdSql
.
checkData
(
0
,
0
,
100
)
# tdLog.info("use diffrent interface stmt")
tdLog
.
info
(
"use diffrent interface stmt"
)
# tdSql.execute("drop database db1;")
tdSql
.
execute
(
"drop database db1;"
)
# # use diffrent interface-stmt
# use diffrent interface-stmt
# os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,BINARY\(4000\) -w 40 \
os
.
system
(
"%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,BINARY\(4000\) -w 40
\
# -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I stmt " % (binPath,cfgPath))
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I stmt "
%
(
binPath
,
cfgPath
))
# tdSql.execute("use db1")
tdSql
.
execute
(
"use db1"
)
# tdSql.query("select count(*) from meters")
tdSql
.
query
(
"select count(*) from meters"
)
# tdSql.checkData(0, 0, 1000)
tdSql
.
checkData
(
0
,
0
,
1000
)
# tdSql.query("select count(tbname) from meters")
tdSql
.
query
(
"select count(tbname) from meters"
)
# tdSql.checkData(0, 0, 10)
tdSql
.
checkData
(
0
,
0
,
10
)
# tdSql.query("select count(*) from `test.0`")
tdSql
.
query
(
"select count(*) from `test.0`"
)
# tdSql.checkData(0, 0, 100)
tdSql
.
checkData
(
0
,
0
,
100
)
# tdLog.info("use diffrent interface rest")
tdLog
.
info
(
"use diffrent interface rest"
)
# tdSql.execute("drop database db1;")
tdSql
.
execute
(
"drop database db1;"
)
# # use diffrent interface -rest
# use diffrent interface -rest
# os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(15\) -w 4097 \
os
.
system
(
"%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(15\) -w 4097
\
# -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I rest " % (binPath,cfgPath))
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I rest "
%
(
binPath
,
cfgPath
))
# tdSql.execute("use db1")
tdSql
.
execute
(
"use db1"
)
# tdSql.query("select count(*) from meters")
tdSql
.
query
(
"select count(*) from meters"
)
# tdSql.checkData(0, 0, 1000)
tdSql
.
checkData
(
0
,
0
,
1000
)
# tdSql.query("select count(tbname) from meters")
tdSql
.
query
(
"select count(tbname) from meters"
)
# tdSql.checkData(0, 0, 10)
tdSql
.
checkData
(
0
,
0
,
10
)
# tdSql.query("select count(*) from `test.0`")
tdSql
.
query
(
"select count(*) from `test.0`"
)
# tdSql.checkData(0, 0, 100)
tdSql
.
checkData
(
0
,
0
,
100
)
# tdLog.info("use diffrent interface sml")
tdLog
.
info
(
"use diffrent interface sml"
)
# tdSql.execute("drop database db1;")
tdSql
.
execute
(
"drop database db1;"
)
# # use diffrent interface-sml
# use diffrent interface-sml
# os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(15\) -w 1024 \
os
.
system
(
"%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(15\) -w 1024
\
# -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I sml " % (binPath,cfgPath))
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I sml "
%
(
binPath
,
cfgPath
))
# tdSql.execute("use db1")
tdSql
.
execute
(
"use db1"
)
# tdSql.query("select count(*) from meters")
tdSql
.
query
(
"select count(*) from meters"
)
# tdSql.checkData(0, 0, 1000)
tdSql
.
checkData
(
0
,
0
,
1000
)
# tdSql.query("select count(tbname) from meters")
tdSql
.
query
(
"select count(tbname) from meters"
)
# tdSql.checkData(0, 0, 10)
tdSql
.
checkData
(
0
,
0
,
10
)
# tdLog.info("all data type")
tdLog
.
info
(
"all data type"
)
# tdSql.execute("drop database db1;")
tdSql
.
execute
(
"drop database db1;"
)
# # all data type-taosc
# all data type-taosc
# os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 \
os
.
system
(
"%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10
\
# -b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY\(15\),NCHAR\(15\) -w 4096 \
-b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY\(15\),NCHAR\(15\) -w 4096
\
# -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. " % (binPath,cfgPath))
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. "
%
(
binPath
,
cfgPath
))
# tdSql.execute("use db1")
tdSql
.
execute
(
"use db1"
)
# tdSql.query("select count(*) from meters")
tdSql
.
query
(
"select count(*) from meters"
)
# tdSql.checkData(0, 0, 1000)
tdSql
.
checkData
(
0
,
0
,
1000
)
# tdSql.query("select count(tbname) from meters")
tdSql
.
query
(
"select count(tbname) from meters"
)
# tdSql.checkData(0, 0, 10)
tdSql
.
checkData
(
0
,
0
,
10
)
# tdSql.query("select count(*) from `test.0`")
tdSql
.
query
(
"select count(*) from `test.0`"
)
# tdSql.checkData(0, 0, 100)
tdSql
.
checkData
(
0
,
0
,
100
)
# tdLog.info("all data type")
tdLog
.
info
(
"all data type"
)
# tdSql.execute("drop database db1;")
tdSql
.
execute
(
"drop database db1;"
)
# # all data type-stmt
# all data type-stmt
# os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 \
os
.
system
(
"%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10
\
# -b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY\(15\),NCHAR\(15\) -w 4096 \
-b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY\(15\),NCHAR\(15\) -w 4096
\
# -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I stmt " % (binPath,cfgPath))
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I stmt "
%
(
binPath
,
cfgPath
))
# tdSql.execute("use db1")
tdSql
.
execute
(
"use db1"
)
# tdSql.query("select count(*) from meters")
tdSql
.
query
(
"select count(*) from meters"
)
# tdSql.checkData(0, 0, 1000)
tdSql
.
checkData
(
0
,
0
,
1000
)
# tdSql.query("select count(tbname) from meters")
tdSql
.
query
(
"select count(tbname) from meters"
)
# tdSql.checkData(0, 0, 10)
tdSql
.
checkData
(
0
,
0
,
10
)
# tdSql.query("select count(*) from `test.0`")
tdSql
.
query
(
"select count(*) from `test.0`"
)
# tdSql.checkData(0, 0, 100)
tdSql
.
checkData
(
0
,
0
,
100
)
# all data type-rest
os
.
system
(
"%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10
\
-b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY\(15\),NCHAR\(15\) -w 4096
\
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I rest "
%
(
binPath
,
cfgPath
))
tdSql
.
execute
(
"use db1"
)
tdSql
.
query
(
"select count(*) from meters"
)
tdSql
.
checkData
(
0
,
0
,
1000
)
tdSql
.
query
(
"select count(tbname) from meters"
)
tdSql
.
checkData
(
0
,
0
,
10
)
tdSql
.
query
(
"select count(*) from `test.0`"
)
tdSql
.
checkData
(
0
,
0
,
100
)
# # all data type-rest
# # all data type-rest
# os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 \
# os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 \
# -b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY\(15\),NCHAR\(15\) -w 4096 \
# -b INT,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY\(15\),NCHAR\(15\) -w 4096 \
# -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I rest " % (binPath,cfgPath))
# -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I sml " % (binPath,cfgPath))
# tdSql.execute("use db1")
# tdSql.query("select count(*) from meters")
# tdSql.checkData(0, 0, 1000)
# tdSql.query("select count(tbname) from meters")
# tdSql.checkData(0, 0, 10)
# tdSql.query("select count(*) from `test.0`")
# tdSql.checkData(0, 0, 100)
# # # all data type-rest
# # os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 \
# # -b INT,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY\(15\),NCHAR\(15\) -w 4096 \
# # -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I sml " % (binPath,cfgPath))
# # tdSql.execute("use db1")
# # tdSql.query("select count(*) from meters")
# # tdSql.checkData(0, 0, 1000)
# # tdSql.query("select count(tbname) from meters")
# # tdSql.checkData(0, 0, 10)
# # # tdSql.query("select count(*) from `test.0`")
# # # tdSql.checkData(0, 0, 100)
# tdLog.info("all data type and interlace rows")
# tdSql.execute("drop database db1;")
# # all data type
# os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db3 -a 1 -l 10\
# -b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY\(15\),NCHAR\(15\) -w 4096\
# -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -B 1000 -M -x -y -O 10 -R 100 -E -m test. " % (binPath,cfgPath))
# tdSql.execute("use db3")
# tdSql.query("select count(*) from meters")
# tdSql.checkData(0, 0, 1000)
# tdSql.query("select count(tbname) from meters")
# tdSql.checkData(0, 0, 10)
# tdSql.query("select count(*) from `test.0`")
# tdSql.checkData(0, 0, 100)
# tdLog.info("all data type and too much para")
# tdLog.info("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(15\) -w 4096 \
# -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test.taosdemo -u root -c %s -h \
# localhost -P 6030 -d db1 -a 1 -l 100 -b float,int,NCHAR\(15\) -w 4096 -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. " % (binPath,cfgPath,cfgPath))
# tdSql.execute("drop database db3;")
# # repeate parameters
# os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(15\) -w 4096 \
# -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test.taosdemo -u root -c %s -h \
# localhost -P 6030 -d db1 -a 1 -l 100 -b float,int,NCHAR\(15\) -w 4096 -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. " % (binPath,cfgPath,cfgPath))
# tdSql.execute("use db1")
# tdSql.execute("use db1")
# tdSql.query("select count(*) from meters")
# tdSql.query("select count(*) from meters")
# tdSql.checkData(0, 0, 1000)
# tdSql.checkData(0, 0, 1000)
# tdSql.query("select count(tbname) from meters")
# tdSql.query("select count(tbname) from meters")
# tdSql.checkData(0, 0, 10)
# tdSql.checkData(0, 0, 10)
# tdSql.query("select count(*) from `test.0`")
# # tdSql.query("select count(*) from `test.0`")
# tdSql.checkData(0, 0, 100)
# # tdSql.checkData(0, 0, 100)
tdLog
.
info
(
"all data type and interlace rows"
)
tdSql
.
execute
(
"drop database db1;"
)
# all data type
os
.
system
(
"%staosBenchmark -u root -c %s -h localhost -P 6030 -d db3 -a 1 -l 10
\
-b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY\(15\),NCHAR\(15\) -w 4096
\
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -B 1000 -M -x -y -O 10 -R 100 -E -m test. "
%
(
binPath
,
cfgPath
))
tdSql
.
execute
(
"use db3"
)
tdSql
.
query
(
"select count(*) from meters"
)
tdSql
.
checkData
(
0
,
0
,
1000
)
tdSql
.
query
(
"select count(tbname) from meters"
)
tdSql
.
checkData
(
0
,
0
,
10
)
tdSql
.
query
(
"select count(*) from `test.0`"
)
tdSql
.
checkData
(
0
,
0
,
100
)
tdLog
.
info
(
"all data type and too much para"
)
tdLog
.
info
(
"%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(15\) -w 4096
\
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test.taosdemo -u root -c %s -h
\
localhost -P 6030 -d db1 -a 1 -l 100 -b float,int,NCHAR\(15\) -w 4096 -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. "
%
(
binPath
,
cfgPath
,
cfgPath
))
tdSql
.
execute
(
"drop database db3;"
)
# repeate parameters
os
.
system
(
"%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(15\) -w 4096
\
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test.taosdemo -u root -c %s -h
\
localhost -P 6030 -d db1 -a 1 -l 100 -b float,int,NCHAR\(15\) -w 4096 -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. "
%
(
binPath
,
cfgPath
,
cfgPath
))
tdSql
.
execute
(
"use db1"
)
tdSql
.
query
(
"select count(*) from meters"
)
tdSql
.
checkData
(
0
,
0
,
1000
)
tdSql
.
query
(
"select count(tbname) from meters"
)
tdSql
.
checkData
(
0
,
0
,
10
)
tdSql
.
query
(
"select count(*) from `test.0`"
)
tdSql
.
checkData
(
0
,
0
,
100
)
# taosdemo error
# taosdemo error
# too max length
# too max length
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录