Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c257f230
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22017
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看板
提交
c257f230
编写于
4月 28, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enh: adjust test cases after refactor db options
上级
2d7ccc3b
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
78 addition
and
77 deletion
+78
-77
tests/script/tsim/db/alter_option.sim
tests/script/tsim/db/alter_option.sim
+38
-35
tests/script/tsim/db/create_all_options.sim
tests/script/tsim/db/create_all_options.sim
+34
-36
tests/script/tsim/sync/oneReplica1VgElect.sim
tests/script/tsim/sync/oneReplica1VgElect.sim
+1
-1
tests/script/tsim/sync/oneReplica1VgElectWithInsert.sim
tests/script/tsim/sync/oneReplica1VgElectWithInsert.sim
+1
-1
tests/script/tsim/sync/threeReplica1VgElect.sim
tests/script/tsim/sync/threeReplica1VgElect.sim
+1
-1
tests/script/tsim/sync/threeReplica1VgElectWihtInsert.sim
tests/script/tsim/sync/threeReplica1VgElectWihtInsert.sim
+1
-1
tests/script/tsim/tmq/prepareBasicEnv-1vgrp.sim
tests/script/tsim/tmq/prepareBasicEnv-1vgrp.sim
+1
-1
tests/script/tsim/tmq/prepareBasicEnv-4vgrp.sim
tests/script/tsim/tmq/prepareBasicEnv-4vgrp.sim
+1
-1
未找到文件。
tests/script/tsim/db/alter_option.sim
浏览文件 @
c257f230
...
...
@@ -58,11 +58,11 @@ endi
print ============= create database
#database_option: {
# BLOCKS value [3~1000, default: 6]
# | BUFFER value [3~16384, default: 96]
# | PAGES value [64~16384, default: 256]
# | CACHELAST value [0, 1, 2, 3]
# | FSYNC value [0 ~ 180000 ms]
# | KEEP value [days, 365000]
# | QUORUM value [1 | 2]
# | REPLICA value [1 | 3]
# | WAL value [1 | 2]
...
...
@@ -98,31 +98,34 @@ endi
if $data7_db != 1440000,1440000,1440000 then # keep
return -1
endi
#if $data8_db != 3 then # cache
# return -1
#endi
#if $data9_db != 7 then # blocks
# return -1
#endi
if $data10_db != 10 then # minrows
if $data8_db != 96 then # buffer
return -1
endi
if $data9_db != 4 then # pagesize
return -1
endi
if $data10_db != 256 then # pages
return -1
endi
if $data11_db != 10 then # minrows
return -1
endi
if $data1
1
_db != 8000 then # maxrows
if $data1
2
_db != 8000 then # maxrows
return -1
endi
if $data1
2
_db != 2 then # wal
if $data1
3
_db != 2 then # wal
return -1
endi
if $data1
3
_db != 1000 then # fsync
if $data1
4
_db != 1000 then # fsync
return -1
endi
if $data1
4
_db != 0 then # comp
if $data1
5
_db != 0 then # comp
return -1
endi
if $data1
5
_db != 3 then # cachelast
if $data1
6
_db != 3 then # cachelast
return -1
endi
if $data1
6
_db != ns then # precision
if $data1
7
_db != ns then # precision
return -1
endi
...
...
@@ -302,14 +305,14 @@ sql_error alter database db maxrows 10 # little than minrows
print ============== step wal
sql alter database db wal 1
sql show databases
print wal $data1
2
_db
if $data1
2
_db != 1 then
print wal $data1
3
_db
if $data1
3
_db != 1 then
return -1
endi
sql alter database db wal 2
sql show databases
print wal $data1
2
_db
if $data1
2
_db != 2 then
print wal $data1
3
_db
if $data1
3
_db != 2 then
return -1
endi
...
...
@@ -321,20 +324,20 @@ sql_error alter database db wal -1
print ============== modify fsync
sql alter database db fsync 2000
sql show databases
print fsync $data1
3
_db
if $data1
3
_db != 2000 then
print fsync $data1
4
_db
if $data1
4
_db != 2000 then
return -1
endi
sql alter database db fsync 500
sql show databases
print fsync $data1
3
_db
if $data1
3
_db != 500 then
print fsync $data1
4
_db
if $data1
4
_db != 500 then
return -1
endi
sql alter database db fsync 0
sql show databases
print fsync $data1
3
_db
if $data1
3
_db != 0 then
print fsync $data1
4
_db
if $data1
4
_db != 0 then
return -1
endi
sql_error alter database db fsync 180001
...
...
@@ -353,32 +356,32 @@ sql_error alter database db comp -1
print ============== modify cachelast [0, 1, 2, 3]
sql alter database db cachelast 2
sql show databases
print cachelast $data1
5
_db
if $data1
5
_db != 2 then
print cachelast $data1
6
_db
if $data1
6
_db != 2 then
return -1
endi
sql alter database db cachelast 1
sql show databases
print cachelast $data1
5
_db
if $data1
5
_db != 1 then
print cachelast $data1
6
_db
if $data1
6
_db != 1 then
return -1
endi
sql alter database db cachelast 0
sql show databases
print cachelast $data1
5
_db
if $data1
5
_db != 0 then
print cachelast $data1
6
_db
if $data1
6
_db != 0 then
return -1
endi
sql alter database db cachelast 2
sql show databases
print cachelast $data1
5
_db
if $data1
5
_db != 2 then
print cachelast $data1
6
_db
if $data1
6
_db != 2 then
return -1
endi
sql alter database db cachelast 3
sql show databases
print cachelast $data1
5
_db
if $data1
5
_db != 3 then
print cachelast $data1
6
_db
if $data1
6
_db != 3 then
return -1
endi
...
...
tests/script/tsim/db/create_all_options.sim
浏览文件 @
c257f230
...
...
@@ -58,8 +58,9 @@ endi
print ============= create database with all options
#database_option: {
# | BLOCKS value [3~1000, default: 6]
# | CACHE value [default: 16]
# | BUFFER value [3~16384, default: 96]
# | PAGES value [64~16384, default: 256]
# | PAGESIZE value [1~16384, default: 4]
# | CACHELAST value [0, 1, 2, 3, default: 0]
# | COMP [0 | 1 | 2, default: 2]
# | DAYS value [60m ~ min(3650d,keep), default: 10d, unit may be minut/hour/day]
...
...
@@ -68,24 +69,18 @@ print ============= create database with all options
# | MINROWS value [10~1000, default: 100]
# | KEEP value [max(1d ~ 365000d), default: 1d, unit may be minut/hour/day]
# | PRECISION ['ms' | 'us' | 'ns', default: ms]
# | QUORUM value [1 | 2, default: 1]
# | REPLICA value [1 | 3, default: 1]
# | TTL value [1d ~ , default: 1]
# | WAL value [1 | 2, default: 1]
# | VGROUPS value [default: 2]
# | SINGLE_STABLE [0 | 1, default: ]
# | STREAM_MODE [0 | 1, default: ]
#
#$data0_db : name
#$data1_db : create_time
#$data2_db : vgroups
#$data3_db : ntables
#$data4_db : replica
#$data5_db : quorum
#$data6_db : days
#$data7_db : keep
#$data8_db : cache
#$data9_db : blocks
#$data10_db : minrows
#$data11_db : maxrows
#$data12_db : wal
...
...
@@ -124,31 +119,34 @@ endi
if $data7_db != 5256000,5256000,5256000 then # keep
return -1
endi
#if $data8_db != 16 then # cache
# return -1
#endi
#if $data9_db != 6 then # blocks
# return -1
#endi
if $data10_db != 100 then # minrows
if $data8_db != 96 then # buffer
return -1
endi
if $data9_db != 4 then # pagesize
return -1
endi
if $data10_db != 256 then # pages
return -1
endi
if $data11_db != 100 then # minrows
return -1
endi
if $data1
1
_db != 4096 then # maxrows
if $data1
2
_db != 4096 then # maxrows
return -1
endi
if $data1
2
_db != 1 then # wal
if $data1
3
_db != 1 then # wal
return -1
endi
if $data1
3
_db != 3000 then # fsync
if $data1
4
_db != 3000 then # fsync
return -1
endi
if $data1
4
_db != 2 then # comp
if $data1
5
_db != 2 then # comp
return -1
endi
if $data1
5
_db != 0 then # cachelast
if $data1
6
_db != 0 then # cachelast
return -1
endi
if $data1
6
_db != ms then # precision
if $data1
7
_db != ms then # precision
return -1
endi
sql drop database db
...
...
@@ -194,7 +192,7 @@ print ====> CACHELAST value [0, 1, 2, 3, default: 0]
sql create database db CACHELAST 1
sql show databases
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data1
5
_db != 1 then
if $data1
6
_db != 1 then
return -1
endi
sql drop database db
...
...
@@ -202,7 +200,7 @@ sql drop database db
sql create database db CACHELAST 2
sql show databases
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data1
5
_db != 2 then
if $data1
6
_db != 2 then
return -1
endi
sql drop database db
...
...
@@ -210,7 +208,7 @@ sql drop database db
sql create database db CACHELAST 3
sql show databases
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data1
5
_db != 3 then
if $data1
6
_db != 3 then
return -1
endi
sql drop database db
...
...
@@ -221,7 +219,7 @@ print ====> COMP [0 | 1 | 2, default: 2]
sql create database db COMP 1
sql show databases
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data1
4
_db != 1 then
if $data1
5
_db != 1 then
return -1
endi
sql drop database db
...
...
@@ -229,7 +227,7 @@ sql drop database db
sql create database db COMP 0
sql show databases
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data1
4
_db != 0 then
if $data1
5
_db != 0 then
return -1
endi
sql drop database db
...
...
@@ -280,7 +278,7 @@ print ====> FSYNC value [0 ~ 180000 ms, default: 3000]
sql create database db FSYNC 0
sql show databases
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data1
3
_db != 0 then
if $data1
4
_db != 0 then
return -1
endi
sql drop database db
...
...
@@ -288,7 +286,7 @@ sql drop database db
sql create database db FSYNC 180000
sql show databases
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data1
3
_db != 180000 then
if $data1
4
_db != 180000 then
return -1
endi
sql drop database db
...
...
@@ -299,10 +297,10 @@ print ====> MAXROWS value [200~10000, default: 4096], MINROWS value [10~1000, de
sql create database db MAXROWS 10000 MINROWS 1000
sql show databases
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data1
0
_db != 1000 then
if $data1
1
_db != 1000 then
return -1
endi
if $data1
1
_db != 10000 then
if $data1
2
_db != 10000 then
return -1
endi
sql drop database db
...
...
@@ -310,10 +308,10 @@ sql drop database db
sql create database db MAXROWS 200 MINROWS 10
sql show databases
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data1
0
_db != 10 then
if $data1
1
_db != 10 then
return -1
endi
if $data1
1
_db != 200 then
if $data1
2
_db != 200 then
return -1
endi
sql drop database db
...
...
@@ -331,7 +329,7 @@ print ====> PRECISION ['ms' | 'us' | 'ns', default: ms]
sql create database db PRECISION 'us'
sql show databases
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data1
6
_db != us then
if $data1
7
_db != us then
return -1
endi
sql drop database db
...
...
@@ -339,7 +337,7 @@ sql drop database db
sql create database db PRECISION 'ns'
sql show databases
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data1
6
_db != ns then
if $data1
7
_db != ns then
return -1
endi
sql drop database db
...
...
@@ -410,7 +408,7 @@ print ====> WAL value [1 | 2, default: 1]
sql create database db WAL 2
sql show databases
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data1
2
_db != 2 then
if $data1
3
_db != 2 then
return -1
endi
sql drop database db
...
...
@@ -418,7 +416,7 @@ sql drop database db
sql create database db WAL 1
sql show databases
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data1
2
_db != 1 then
if $data1
3
_db != 1 then
return -1
endi
sql drop database db
...
...
tests/script/tsim/sync/oneReplica1VgElect.sim
浏览文件 @
c257f230
...
...
@@ -83,7 +83,7 @@ print $data(db)[13] $data(db)[14] $data(db)[15] $data(db)[16] $data(db)[17] $dat
if $rows != 3 then
return -1
endi
if $data(db)[
20
] != ready then
if $data(db)[
19
] != ready then
goto check_db_ready
endi
...
...
tests/script/tsim/sync/oneReplica1VgElectWithInsert.sim
浏览文件 @
c257f230
...
...
@@ -83,7 +83,7 @@ print $data(db)[13] $data(db)[14] $data(db)[15] $data(db)[16] $data(db)[17] $dat
if $rows != 3 then
return -1
endi
if $data(db)[
20
] != ready then
if $data(db)[
19
] != ready then
goto check_db_ready
endi
...
...
tests/script/tsim/sync/threeReplica1VgElect.sim
浏览文件 @
c257f230
...
...
@@ -83,7 +83,7 @@ print $data(db)[13] $data(db)[14] $data(db)[15] $data(db)[16] $data(db)[17] $dat
if $rows != 3 then
return -1
endi
if $data(db)[
20
] != ready then
if $data(db)[
19
] != ready then
goto check_db_ready
endi
...
...
tests/script/tsim/sync/threeReplica1VgElectWihtInsert.sim
浏览文件 @
c257f230
...
...
@@ -83,7 +83,7 @@ print $data(db)[13] $data(db)[14] $data(db)[15] $data(db)[16] $data(db)[17] $dat
if $rows != 3 then
return -1
endi
if $data(db)[
20
] != ready then
if $data(db)[
19
] != ready then
goto check_db_ready
endi
...
...
tests/script/tsim/tmq/prepareBasicEnv-1vgrp.sim
浏览文件 @
c257f230
...
...
@@ -39,7 +39,7 @@ sql show databases
print ==> rows: $rows
print ==> $data(db)[0] $data(db)[1] $data(db)[2] $data(db)[3] $data(db)[4] $data(db)[5] $data(db)[6] $data(db)[7] $data(db)[8] $data(db)[9] $data(db)[10] $data(db)[11] $data(db)[12]
print $data(db)[13] $data(db)[14] $data(db)[15] $data(db)[16] $data(db)[17] $data(db)[18] $data(db)[19] $data(db)[20]
if $data(db)[
20
] != nostrict then
if $data(db)[
19
] != nostrict then
sleep 100
$loop_cnt = $loop_cnt + 1
goto check_db_ready
...
...
tests/script/tsim/tmq/prepareBasicEnv-4vgrp.sim
浏览文件 @
c257f230
...
...
@@ -39,7 +39,7 @@ sql show databases
print ==> rows: $rows
print ==> $data(db)[0] $data(db)[1] $data(db)[2] $data(db)[3] $data(db)[4] $data(db)[5] $data(db)[6] $data(db)[7] $data(db)[8] $data(db)[9] $data(db)[10] $data(db)[11] $data(db)[12]
print $data(db)[13] $data(db)[14] $data(db)[15] $data(db)[16] $data(db)[17] $data(db)[18] $data(db)[19] $data(db)[20]
if $data(db)[
20
] != nostrict then
if $data(db)[
19
] != nostrict then
sleep 100
$loop_cnt = $loop_cnt + 1
goto check_db_ready
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录