Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a484fa72
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看板
未验证
提交
a484fa72
编写于
10月 17, 2022
作者:
H
Hui Li
提交者:
GitHub
10月 17, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #17341 from taosdata/test/jcy
test:add test case of alter database param buffer and pages
上级
5572c9c5
b850c617
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
137 addition
and
2 deletion
+137
-2
tests/system-test/1-insert/alter_database.py
tests/system-test/1-insert/alter_database.py
+58
-0
tests/system-test/7-tmq/create_wrong_topic.py
tests/system-test/7-tmq/create_wrong_topic.py
+77
-0
tests/system-test/fulltest.sh
tests/system-test/fulltest.sh
+2
-2
未找到文件。
tests/system-test/1-insert/alter_database.py
0 → 100644
浏览文件 @
a484fa72
import
taos
import
sys
import
time
import
socket
import
os
import
threading
from
util.log
import
*
from
util.sql
import
*
from
util.cases
import
*
from
util.dnodes
import
*
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
self
.
buffer_boundary
=
[
3
,
4097
,
8193
,
12289
,
16384
]
self
.
buffer_error
=
[
self
.
buffer_boundary
[
0
]
-
1
,
self
.
buffer_boundary
[
-
1
]
+
1
,
12289
,
96
]
# pages_boundary >= 64
self
.
pages_boundary
=
[
64
,
128
,
512
]
self
.
pages_error
=
[
self
.
pages_boundary
[
0
]
-
1
]
def
alter_buffer
(
self
):
tdSql
.
execute
(
'create database db'
)
for
buffer
in
self
.
buffer_boundary
:
tdSql
.
execute
(
f
'alter database db buffer
{
buffer
}
'
)
tdSql
.
query
(
'select * from information_schema.ins_databases where name = "db"'
)
tdSql
.
checkEqual
(
tdSql
.
queryResult
[
0
][
8
],
buffer
)
tdSql
.
execute
(
'drop database db'
)
tdSql
.
execute
(
'create database db vgroups 10'
)
for
buffer
in
self
.
buffer_error
:
tdSql
.
error
(
f
'alter database db buffer
{
buffer
}
'
)
tdSql
.
execute
(
'drop database db'
)
def
alter_pages
(
self
):
tdSql
.
execute
(
'create database db'
)
for
pages
in
self
.
pages_boundary
:
tdSql
.
execute
(
f
'alter database db pages
{
pages
}
'
)
tdSql
.
query
(
'select * from information_schema.ins_databases where name = "db"'
)
tdSql
.
checkEqual
(
tdSql
.
queryResult
[
0
][
10
],
pages
)
tdSql
.
execute
(
'drop database db'
)
tdSql
.
execute
(
'create database db'
)
tdSql
.
query
(
'select * from information_schema.ins_databases where name = "db"'
)
self
.
pages_error
.
append
(
tdSql
.
queryResult
[
0
][
10
])
for
pages
in
self
.
pages_error
:
tdSql
.
error
(
f
'alter database db pages
{
pages
}
'
)
tdSql
.
execute
(
'drop database db'
)
def
run
(
self
):
tdSql
.
error
(
'create database db1 vgroups 10 buffer 12289'
)
self
.
alter_buffer
()
self
.
alter_pages
()
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
f
"
{
__file__
}
successfully executed"
)
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
\ No newline at end of file
tests/system-test/7-tmq/create_wrong_topic.py
0 → 100644
浏览文件 @
a484fa72
import
taos
import
sys
import
time
import
socket
import
os
import
threading
from
util.common
import
*
from
util.log
import
*
from
util.sql
import
*
from
util.cases
import
*
from
util.dnodes
import
*
from
util.sqlset
import
*
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
self
.
setsql
=
TDSetSql
()
self
.
rowNum
=
10
self
.
ts
=
1537146000000
self
.
binary_str
=
'taosdata'
self
.
nchar_str
=
'涛思数据'
self
.
column_dict
=
{
'ts'
:
'timestamp'
,
'col1'
:
'tinyint'
,
'col2'
:
'smallint'
,
'col3'
:
'int'
,
'col4'
:
'bigint'
,
'col5'
:
'tinyint unsigned'
,
'col6'
:
'smallint unsigned'
,
'col7'
:
'int unsigned'
,
'col8'
:
'bigint unsigned'
,
'col9'
:
'float'
,
'col10'
:
'double'
,
}
self
.
error_topic
=
[
'avg'
,
'count'
,
'spread'
,
'stddev'
,
'sum'
,
'hyperloglog'
]
def
insert_data
(
self
,
column_dict
,
tbname
,
row_num
):
insert_sql
=
self
.
setsql
.
set_insertsql
(
column_dict
,
tbname
)
for
i
in
range
(
row_num
):
insert_list
=
[]
self
.
setsql
.
insert_values
(
column_dict
,
i
,
insert_sql
,
insert_list
,
self
.
ts
)
def
wrong_topic
(
self
):
tdSql
.
prepare
()
tdSql
.
execute
(
'use db'
)
stbname
=
f
'db.
{
tdCom
.
getLongName
(
5
,
"letters"
)
}
'
tag_dict
=
{
't0'
:
'int'
}
tag_values
=
[
f
'1'
]
tdSql
.
execute
(
self
.
setsql
.
set_create_stable_sql
(
stbname
,
self
.
column_dict
,
tag_dict
))
tdSql
.
execute
(
f
"create table
{
stbname
}
_tb1 using
{
stbname
}
tags(
{
tag_values
[
0
]
}
)"
)
self
.
insert_data
(
self
.
column_dict
,
f
'
{
stbname
}
_tb1'
,
self
.
rowNum
)
for
column
in
self
.
column_dict
.
keys
():
for
func
in
self
.
error_topic
:
if
func
.
lower
()
!=
'count'
and
column
.
lower
()
!=
'ts'
:
tdSql
.
error
(
f
'create topic tpn as select
{
func
}
(
{
column
}
) from
{
stbname
}
'
)
elif
func
.
lower
()
==
'count'
:
tdSql
.
error
(
f
'create topic tpn as select
{
func
}
(*) from
{
stbname
}
'
)
for
column
in
self
.
column_dict
.
keys
():
if
column
.
lower
()
!=
'ts'
:
tdSql
.
error
(
f
'create topic tpn as select apercentile(
{
column
}
,50) from
{
stbname
}
'
)
tdSql
.
error
(
f
'create topic tpn as select leastquares(
{
column
}
,1,1) from
{
stbname
}
_tb1'
)
tdSql
.
error
(
f
'create topic tpn as select HISTOGRAM(
{
column
}
,user_input,[1,3,5,7],0) from
{
stbname
}
'
)
tdSql
.
error
(
f
'create topic tpn as select percentile(
{
column
}
,1) from
{
stbname
}
_tb1'
)
pass
def
run
(
self
):
self
.
wrong_topic
()
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
f
"
{
__file__
}
successfully executed"
)
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
\ No newline at end of file
tests/system-test/fulltest.sh
浏览文件 @
a484fa72
...
@@ -18,7 +18,7 @@ python3 ./test.py -f 0-others/sysinfo.py
...
@@ -18,7 +18,7 @@ python3 ./test.py -f 0-others/sysinfo.py
python3 ./test.py
-f
0-others/user_control.py
python3 ./test.py
-f
0-others/user_control.py
python3 ./test.py
-f
0-others/fsync.py
python3 ./test.py
-f
0-others/fsync.py
python3 ./test.py
-f
0-others/compatibility.py
python3 ./test.py
-f
0-others/compatibility.py
python3 ./test.py
-f
1-insert/alter_database.py
python3 ./test.py
-f
1-insert/influxdb_line_taosc_insert.py
python3 ./test.py
-f
1-insert/influxdb_line_taosc_insert.py
python3 ./test.py
-f
1-insert/opentsdb_telnet_line_taosc_insert.py
python3 ./test.py
-f
1-insert/opentsdb_telnet_line_taosc_insert.py
python3 ./test.py
-f
1-insert/opentsdb_json_taosc_insert.py
python3 ./test.py
-f
1-insert/opentsdb_json_taosc_insert.py
...
@@ -279,7 +279,7 @@ python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_
...
@@ -279,7 +279,7 @@ python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_
python3 test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py
-N
4
-M
1
python3 test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py
-N
4
-M
1
# python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py -N 4 -M 1
# python3 test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py -N 4 -M 1
python3 ./test.py
-f
7-tmq/create_wrong_topic.py
python3 ./test.py
-f
7-tmq/dropDbR3ConflictTransaction.py
-N
3
python3 ./test.py
-f
7-tmq/dropDbR3ConflictTransaction.py
-N
3
python3 ./test.py
-f
7-tmq/basic5.py
python3 ./test.py
-f
7-tmq/basic5.py
python3 ./test.py
-f
7-tmq/subscribeDb.py
python3 ./test.py
-f
7-tmq/subscribeDb.py
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录