Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
683e2cff
TDengine
项目概览
taosdata
/
TDengine
接近 2 年 前同步成功
通知
1192
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
683e2cff
编写于
11月 09, 2022
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change test cases
上级
961e2d74
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
15 deletion
+22
-15
tests/script/tsim/db/alter_option.sim
tests/script/tsim/db/alter_option.sim
+2
-2
tests/script/tsim/db/create_all_options.sim
tests/script/tsim/db/create_all_options.sim
+2
-2
tests/system-test/1-insert/alter_database.py
tests/system-test/1-insert/alter_database.py
+18
-11
未找到文件。
tests/script/tsim/db/alter_option.sim
浏览文件 @
683e2cff
...
@@ -38,7 +38,7 @@ endi
...
@@ -38,7 +38,7 @@ endi
print ============= create database
print ============= create database
#database_option: {
#database_option: {
# | BUFFER value [3~16384, default:
9
6]
# | BUFFER value [3~16384, default:
25
6]
# | PAGES value [64~16384, default: 256]
# | PAGES value [64~16384, default: 256]
# | CACHEMODEL value ['node', 'last_row', 'last_value', 'both']
# | CACHEMODEL value ['node', 'last_row', 'last_value', 'both']
# | WAL_FSYNC_PERIOD value [0 ~ 180000 ms]
# | WAL_FSYNC_PERIOD value [0 ~ 180000 ms]
...
@@ -78,7 +78,7 @@ endi
...
@@ -78,7 +78,7 @@ endi
if $data7_db != 1440000m,1440000m,1440000m then # keep
if $data7_db != 1440000m,1440000m,1440000m then # keep
return -1
return -1
endi
endi
if $data8_db !=
9
6 then # buffer
if $data8_db !=
25
6 then # buffer
return -1
return -1
endi
endi
if $data9_db != 4 then # pagesize
if $data9_db != 4 then # pagesize
...
...
tests/script/tsim/db/create_all_options.sim
浏览文件 @
683e2cff
...
@@ -37,7 +37,7 @@ endi
...
@@ -37,7 +37,7 @@ endi
print ============= create database with all options
print ============= create database with all options
#database_option: {
#database_option: {
# | BUFFER value [3~16384, default:
9
6]
# | BUFFER value [3~16384, default:
25
6]
# | PAGES value [64~16384, default: 256]
# | PAGES value [64~16384, default: 256]
# | PAGESIZE value [1~16384, default: 4]
# | PAGESIZE value [1~16384, default: 4]
# | CACHEMODEL value ['node', 'last_row', 'last_value', 'both', default: 'node']
# | CACHEMODEL value ['node', 'last_row', 'last_value', 'both', default: 'node']
...
@@ -98,7 +98,7 @@ endi
...
@@ -98,7 +98,7 @@ endi
if $data7_db != 5256000m,5256000m,5256000m then # keep
if $data7_db != 5256000m,5256000m,5256000m then # keep
return -1
return -1
endi
endi
if $data8_db !=
9
6 then # buffer
if $data8_db !=
25
6 then # buffer
return -1
return -1
endi
endi
if $data9_db != 4 then # pagesize
if $data9_db != 4 then # pagesize
...
...
tests/system-test/1-insert/alter_database.py
浏览文件 @
683e2cff
...
@@ -10,37 +10,43 @@ from util.sql import *
...
@@ -10,37 +10,43 @@ from util.sql import *
from
util.cases
import
*
from
util.cases
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
,
replicaVar
=
1
):
def
init
(
self
,
conn
,
logSql
,
replicaVar
=
1
):
self
.
replicaVar
=
int
(
replicaVar
)
self
.
replicaVar
=
int
(
replicaVar
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
self
.
buffer_boundary
=
[
3
,
4097
,
8193
,
12289
,
16384
]
self
.
buffer_boundary
=
[
3
,
4097
,
8193
,
12289
,
16384
]
self
.
buffer_error
=
[
self
.
buffer_boundary
[
0
]
-
1
,
self
.
buffer_boundary
[
-
1
]
+
1
,
12289
,
96
]
self
.
buffer_error
=
[
self
.
buffer_boundary
[
0
]
-
1
,
self
.
buffer_boundary
[
-
1
]
+
1
,
12289
,
256
]
# pages_boundary >= 64
# pages_boundary >= 64
self
.
pages_boundary
=
[
64
,
128
,
512
]
self
.
pages_boundary
=
[
64
,
128
,
512
]
self
.
pages_error
=
[
self
.
pages_boundary
[
0
]
-
1
]
self
.
pages_error
=
[
self
.
pages_boundary
[
0
]
-
1
]
def
alter_buffer
(
self
):
def
alter_buffer
(
self
):
tdSql
.
execute
(
'create database db'
)
tdSql
.
execute
(
'create database db'
)
for
buffer
in
self
.
buffer_boundary
:
for
buffer
in
self
.
buffer_boundary
:
tdSql
.
execute
(
f
'alter database db buffer
{
buffer
}
'
)
tdSql
.
execute
(
f
'alter database db buffer
{
buffer
}
'
)
tdSql
.
query
(
'select * from information_schema.ins_databases where name = "db"'
)
tdSql
.
query
(
tdSql
.
checkEqual
(
tdSql
.
queryResult
[
0
][
8
],
buffer
)
'select * from information_schema.ins_databases where name = "db"'
)
tdSql
.
checkEqual
(
tdSql
.
queryResult
[
0
][
8
],
buffer
)
tdSql
.
execute
(
'drop database db'
)
tdSql
.
execute
(
'drop database db'
)
tdSql
.
execute
(
'create database db vgroups 10'
)
tdSql
.
execute
(
'create database db vgroups 10'
)
for
buffer
in
self
.
buffer_error
:
for
buffer
in
self
.
buffer_error
:
tdSql
.
error
(
f
'alter database db buffer
{
buffer
}
'
)
tdSql
.
error
(
f
'alter database db buffer
{
buffer
}
'
)
tdSql
.
execute
(
'drop database db'
)
tdSql
.
execute
(
'drop database db'
)
def
alter_pages
(
self
):
def
alter_pages
(
self
):
tdSql
.
execute
(
'create database db'
)
tdSql
.
execute
(
'create database db'
)
for
pages
in
self
.
pages_boundary
:
for
pages
in
self
.
pages_boundary
:
tdSql
.
execute
(
f
'alter database db pages
{
pages
}
'
)
tdSql
.
execute
(
f
'alter database db pages
{
pages
}
'
)
tdSql
.
query
(
'select * from information_schema.ins_databases where name = "db"'
)
tdSql
.
query
(
tdSql
.
checkEqual
(
tdSql
.
queryResult
[
0
][
10
],
pages
)
'select * from information_schema.ins_databases where name = "db"'
)
tdSql
.
checkEqual
(
tdSql
.
queryResult
[
0
][
10
],
pages
)
tdSql
.
execute
(
'drop database db'
)
tdSql
.
execute
(
'drop database db'
)
tdSql
.
execute
(
'create database db'
)
tdSql
.
execute
(
'create database db'
)
tdSql
.
query
(
'select * from information_schema.ins_databases where name = "db"'
)
tdSql
.
query
(
'select * from information_schema.ins_databases where name = "db"'
)
self
.
pages_error
.
append
(
tdSql
.
queryResult
[
0
][
10
])
self
.
pages_error
.
append
(
tdSql
.
queryResult
[
0
][
10
])
for
pages
in
self
.
pages_error
:
for
pages
in
self
.
pages_error
:
tdSql
.
error
(
f
'alter database db pages
{
pages
}
'
)
tdSql
.
error
(
f
'alter database db pages
{
pages
}
'
)
...
@@ -55,5 +61,6 @@ class TDTestCase:
...
@@ -55,5 +61,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
f
"
{
__file__
}
successfully executed"
)
tdLog
.
success
(
f
"
{
__file__
}
successfully executed"
)
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录