Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c6f21c49
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看板
提交
c6f21c49
编写于
5月 30, 2022
作者:
haoranc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test:modify testcase of python connector using Statement API
上级
78306757
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
127 addition
and
6 deletion
+127
-6
tests/system-test/1-insert/performanceInsert.json
tests/system-test/1-insert/performanceInsert.json
+79
-0
tests/system-test/1-insert/performanceQuery.json
tests/system-test/1-insert/performanceQuery.json
+42
-0
tests/system-test/1-insert/test_stmt_insert_query.py
tests/system-test/1-insert/test_stmt_insert_query.py
+5
-6
tests/system-test/fulltest.sh
tests/system-test/fulltest.sh
+1
-0
未找到文件。
tests/system-test/1-insert/performanceInsert.json
0 → 100644
浏览文件 @
c6f21c49
{
"filetype"
:
"insert"
,
"cfgdir"
:
"/etc/taos/"
,
"host"
:
"test216"
,
"port"
:
6030
,
"user"
:
"root"
,
"password"
:
"taosdata"
,
"thread_count"
:
8
,
"thread_count_create_tbl"
:
8
,
"result_file"
:
"./insert_res.txt"
,
"confirm_parameter_prompt"
:
"no"
,
"insert_interval"
:
0
,
"interlace_rows"
:
1000
,
"num_of_records_per_req"
:
100000
,
"databases"
:
[
{
"dbinfo"
:
{
"name"
:
"db"
,
"drop"
:
"yes"
,
"vgroups"
:
24
},
"super_tables"
:
[
{
"name"
:
"stb"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
100000
,
"childtable_prefix"
:
"stb_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
50000
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
5
,
"interlace_rows"
:
100000
,
"insert_interval"
:
0
,
"max_sql_len"
:
10000000
,
"disorder_ratio"
:
0
,
"disorder_range"
:
1000
,
"timestamp_step"
:
10
,
"start_timestamp"
:
"2022-05-01 00:00:00.000"
,
"sample_format"
:
"csv"
,
"use_sample_ts"
:
"no"
,
"tags_file"
:
""
,
"columns"
:
[
{
"type"
:
"INT"
},
{
"type"
:
"TINYINT"
,
"count"
:
1
},
{
"type"
:
"DOUBLE"
},
{
"type"
:
"BINARY"
,
"len"
:
40
,
"count"
:
1
},
{
"type"
:
"nchar"
,
"len"
:
20
,
"count"
:
1
}
],
"tags"
:
[
{
"type"
:
"TINYINT"
,
"count"
:
1
},
{
"type"
:
"BINARY"
,
"len"
:
16
,
"count"
:
1
}
]
}
]
}
]
}
\ No newline at end of file
tests/system-test/1-insert/performanceQuery.json
0 → 100644
浏览文件 @
c6f21c49
{
"filetype"
:
"query"
,
"cfgdir"
:
"/etc/taos"
,
"host"
:
"test216"
,
"port"
:
6030
,
"user"
:
"root"
,
"password"
:
"taosdata"
,
"confirm_parameter_prompt"
:
"no"
,
"databases"
:
"db"
,
"query_times"
:
100
,
"query_mode"
:
"taosc"
,
"specified_table_query"
:
{
"query_interval"
:
0
,
"threads"
:
8
,
"sqls"
:
[
{
"sql"
:
"select count(*) from stb_0 "
,
"result"
:
"./query_res0.txt"
},
{
"sql"
:
"select last_row(*) from stb_1 "
,
"result"
:
"./query_res1.txt"
},
{
"sql"
:
"select last(*) from stb_2 "
,
"result"
:
"./query_res2.txt"
},
{
"sql"
:
"select first(*) from stb_3 "
,
"result"
:
"./query_res3.txt"
},
{
"sql"
:
"select avg(c0),min(c2),max(c1) from stb_4"
,
"result"
:
"./query_res4.txt"
},
{
"sql"
:
"select avg(c0),min(c2),max(c1) from stb_5 where ts <= '2022-05-01 20:00:00.500' and ts >= '2022-05-01 00:00:00.000' "
,
"result"
:
"./query_res5.txt"
}
]
}
}
\ No newline at end of file
tests/system-test/1-insert/test_stmt_insert_query.py
浏览文件 @
c6f21c49
...
...
@@ -132,11 +132,11 @@ class TDTestCase:
querystmt
.
bind_param
(
queryparam
)
querystmt
.
execute
()
result
=
querystmt
.
use_result
()
rows
=
result
.
fetch_all
()
print
(
querystmt
.
use_result
())
#
rows=result.fetch_all()
#
print( querystmt.use_result())
# result = conn.query("select * from log")
#
rows=result.fetch_all()
rows
=
result
.
fetch_all
()
# rows=result.fetch_all()
print
(
rows
)
assert
rows
[
1
][
0
]
==
"ts"
...
...
@@ -247,10 +247,9 @@ class TDTestCase:
config
=
buildPath
+
"../sim/dnode1/cfg/"
host
=
"localhost"
connectstmt
=
self
.
newcon
(
host
,
config
)
print
(
connectstmt
)
self
.
test_stmt_insert_multi
(
connectstmt
)
connectstmt
=
self
.
newcon
(
host
,
config
)
self
.
test_stmt_set_tbname_tag
(
connectstmt
)
#
connectstmt=self.newcon(host,config)
#
self.test_stmt_set_tbname_tag(connectstmt)
return
...
...
tests/system-test/fulltest.sh
浏览文件 @
c6f21c49
...
...
@@ -15,6 +15,7 @@ python3 ./test.py -f 0-others/user_control.py
python3 ./test.py
-f
0-others/fsync.py
python3 ./test.py
-f
1-insert/opentsdb_telnet_line_taosc_insert.py
python3 ./test.py
-f
1-insert/test_stmt_insert_query.py
python3 ./test.py
-f
2-query/between.py
python3 ./test.py
-f
2-query/distinct.py
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录