Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
06d538bf
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
未验证
提交
06d538bf
编写于
11月 05, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
11月 05, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #17888 from taosdata/test/TD-20160
test:add parameter for mixed deployed mnodes in testcase framework
上级
1c434501
1ef5a41c
变更
23
隐藏空白更改
内联
并排
Showing
23 changed file
with
194 addition
and
149 deletion
+194
-149
tests/pytest/util/cluster.py
tests/pytest/util/cluster.py
+9
-2
tests/pytest/util/dnodes.py
tests/pytest/util/dnodes.py
+1
-1
tests/system-test/0-others/compa4096.json
tests/system-test/0-others/compa4096.json
+76
-0
tests/system-test/0-others/compatibility.py
tests/system-test/0-others/compatibility.py
+11
-1
tests/system-test/6-cluster/5dnode3mnodeAdd1Ddnoe.py
tests/system-test/6-cluster/5dnode3mnodeAdd1Ddnoe.py
+6
-8
tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py
tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py
+5
-8
tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py
...stem-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py
+5
-8
tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py
...test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py
+5
-8
tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py
...-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py
+5
-9
tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py
...test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py
+4
-8
tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py
...est/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py
+4
-8
tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py
...-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py
+4
-10
tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDbRep3.py
...t/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDbRep3.py
+4
-8
tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateStb.py
...test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateStb.py
+4
-8
tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py
...-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py
+4
-8
tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateStb.py
...test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateStb.py
+4
-8
tests/system-test/6-cluster/5dnode3mnodeStop.py
tests/system-test/6-cluster/5dnode3mnodeStop.py
+11
-8
tests/system-test/6-cluster/5dnode3mnodeStop2Follower.py
tests/system-test/6-cluster/5dnode3mnodeStop2Follower.py
+3
-8
tests/system-test/6-cluster/5dnode3mnodeStopConnect.py
tests/system-test/6-cluster/5dnode3mnodeStopConnect.py
+5
-9
tests/system-test/6-cluster/5dnode3mnodeStopFollowerLeader.py
...s/system-test/6-cluster/5dnode3mnodeStopFollowerLeader.py
+5
-9
tests/system-test/6-cluster/5dnode3mnodeStopLoop.py
tests/system-test/6-cluster/5dnode3mnodeStopLoop.py
+3
-7
tests/system-test/fulltest.sh
tests/system-test/fulltest.sh
+3
-1
tests/system-test/test.py
tests/system-test/test.py
+13
-4
未找到文件。
tests/pytest/util/cluster.py
浏览文件 @
06d538bf
...
...
@@ -36,7 +36,7 @@ class ConfigureyCluster:
self
.
portStep
=
100
self
.
mnodeNums
=
0
def
configure_cluster
(
self
,
dnodeNums
=
5
,
mnodeNums
=
0
,
startPort
=
6030
,
portStep
=
100
,
hostname
=
"%s"
%
hostname
):
def
configure_cluster
(
self
,
dnodeNums
=
5
,
mnodeNums
=
0
,
independentMnode
=
True
,
startPort
=
6030
,
portStep
=
100
,
hostname
=
"%s"
%
hostname
):
self
.
startPort
=
int
(
startPort
)
self
.
portStep
=
int
(
portStep
)
self
.
hostname
=
hostname
...
...
@@ -52,7 +52,7 @@ class ConfigureyCluster:
dnode
.
addExtraCfg
(
"secondEp"
,
f
"
{
hostname
}
:
{
startPort_sec
}
"
)
# configure dnoe of independent mnodes
if
num
<=
self
.
mnodeNums
and
self
.
mnodeNums
!=
0
:
if
num
<=
self
.
mnodeNums
and
self
.
mnodeNums
!=
0
and
independentMnode
==
True
:
dnode
.
addExtraCfg
(
"supportVnodes"
,
0
)
# print(dnode)
self
.
dnodes
.
append
(
dnode
)
...
...
@@ -67,6 +67,13 @@ class ConfigureyCluster:
tdSql
.
execute
(
" create dnode '%s';"
%
dnode_id
)
def
create_mnode
(
self
,
conn
,
mnodeNums
):
tdSql
.
init
(
conn
.
cursor
())
mnodeNums
=
int
(
mnodeNums
)
for
i
in
range
(
2
,
mnodeNums
+
1
):
tdSql
.
execute
(
" create mnode on dnode %d;"
%
i
)
def
check_dnode
(
self
,
conn
):
tdSql
.
init
(
conn
.
cursor
())
...
...
tests/pytest/util/dnodes.py
浏览文件 @
06d538bf
...
...
@@ -418,7 +418,7 @@ class TDDnode:
if
i
>
50
:
break
with
open
(
logFile
)
as
f
:
timeout
=
time
.
time
()
+
6
0
*
2
timeout
=
time
.
time
()
+
1
0
*
2
while
True
:
line
=
f
.
readline
().
encode
(
'utf-8'
)
if
bkey
in
line
:
...
...
tests/system-test/0-others/compa4096.json
0 → 100644
浏览文件 @
06d538bf
{
"filetype"
:
"insert"
,
"cfgdir"
:
"/etc/taos"
,
"host"
:
"localhost"
,
"port"
:
6030
,
"rest_port"
:
6041
,
"user"
:
"root"
,
"password"
:
"taosdata"
,
"thread_count"
:
100
,
"create_table_thread_count"
:
24
,
"result_file"
:
"taosBenchmark_result.log"
,
"confirm_parameter_prompt"
:
"no"
,
"insert_interval"
:
0
,
"num_of_records_per_req"
:
1000000
,
"max_sql_len"
:
1024000
,
"databases"
:
[
{
"dbinfo"
:
{
"name"
:
"db4096"
,
"drop"
:
"yes"
,
"replica"
:
1
,
"duration"
:
10
,
"precision"
:
"ms"
,
"keep"
:
3650
,
"comp"
:
2
,
"vgroups"
:
2
,
"buffer"
:
1000
},
"super_tables"
:
[
{
"name"
:
"stb0"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
5
,
"childtable_prefix"
:
"ctb0"
,
"escape_character"
:
"no"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
500
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"rollup"
:
null
,
"interlace_rows"
:
0
,
"line_protocol"
:
null
,
"tcp_transfer"
:
"no"
,
"insert_rows"
:
10000
,
"childtable_limit"
:
0
,
"childtable_offset"
:
0
,
"rows_per_tbl"
:
0
,
"max_sql_len"
:
1048576
,
"disorder_ratio"
:
0
,
"disorder_range"
:
1000
,
"timestamp_step"
:
1000
,
"start_timestamp"
:
"2022-10-22 17:20:36"
,
"sample_format"
:
"csv"
,
"sample_file"
:
"./sample.csv"
,
"tags_file"
:
""
,
"columns"
:
[
{
"type"
:
"INT"
,
"count"
:
4094
}
],
"tags"
:
[
{
"type"
:
"TINYINT"
,
"count"
:
1
}
]
}
]
}
],
"prepare_rand"
:
10000
,
"chinese"
:
"no"
,
"streams"
:
false
,
"test_log"
:
"/root/testlog/"
}
tests/system-test/0-others/compatibility.py
浏览文件 @
06d538bf
...
...
@@ -93,6 +93,7 @@ class TDTestCase:
oldServerVersion
=
tdsqlF
.
queryResult
[
0
][
0
]
tdLog
.
info
(
f
"Base server version is
{
oldServerVersion
}
"
)
tdsqlF
.
query
(
f
"SELECT CLIENT_VERSION();"
)
# the oldClientVersion can't be updated in the same python process,so the version is new compiled verison
oldClientVersion
=
tdsqlF
.
queryResult
[
0
][
0
]
tdLog
.
info
(
f
"Base client version is
{
oldClientVersion
}
"
)
...
...
@@ -105,7 +106,16 @@ class TDTestCase:
# tdsqlF.query(f"select count(*) from {stb}")
# tdsqlF.checkData(0,0,tableNumbers*recordNumbers1)
os
.
system
(
"pkill taosd"
)
sleep
(
1
)
sleep
(
2
)
print
(
f
"start taosd: nohup taosd -c
{
cPath
}
& "
)
os
.
system
(
f
" nohup taosd -c
{
cPath
}
& "
)
sleep
(
10
)
tdLog
.
info
(
" LD_LIBRARY_PATH=/usr/lib taosBenchmark -f 0-others/compa4096.json -y "
)
os
.
system
(
"LD_LIBRARY_PATH=/usr/lib taosBenchmark -f 0-others/compa4096.json -y"
)
os
.
system
(
"pkill -9 taosd"
)
tdLog
.
printNoPrefix
(
"==========step2:update new version "
)
self
.
buildTaosd
(
bPath
)
...
...
tests/system-test/6-cluster/5dnode3mnodeAdd1Ddnoe.py
浏览文件 @
06d538bf
...
...
@@ -126,14 +126,12 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
'%s:6030'
%
self
.
host
)
tdSql
.
checkData
(
4
,
1
,
'%s:6430'
%
self
.
host
)
clusterComCheck
.
checkDnodes
(
dnodeNumbers
)
clusterComCheck
.
checkMnodeStatus
(
1
)
# fisr add three mnodes;
tdLog
.
info
(
"fisr add three mnodes and check mnode status"
)
tdSql
.
execute
(
"create mnode on dnode 2"
)
clusterComCheck
.
checkMnodeStatus
(
2
)
tdSql
.
execute
(
"create mnode on dnode 3"
)
clusterComCheck
.
checkMnodeStatus
(
3
)
#check mnode status
tdLog
.
info
(
"check mnode status"
)
clusterComCheck
.
checkMnodeStatus
(
mnodeNums
)
# add some error operations and
tdLog
.
info
(
"Confirm the status of the dnode again"
)
...
...
tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py
浏览文件 @
06d538bf
...
...
@@ -126,14 +126,11 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
'%s:6030'
%
self
.
host
)
tdSql
.
checkData
(
4
,
1
,
'%s:6430'
%
self
.
host
)
clusterComCheck
.
checkDnodes
(
dnodeNumbers
)
clusterComCheck
.
checkMnodeStatus
(
1
)
# fisr add three mnodes;
tdLog
.
info
(
"fisr add three mnodes and check mnode status"
)
tdSql
.
execute
(
"create mnode on dnode 2"
)
clusterComCheck
.
checkMnodeStatus
(
2
)
tdSql
.
execute
(
"create mnode on dnode 3"
)
clusterComCheck
.
checkMnodeStatus
(
3
)
#check mnode status
tdLog
.
info
(
"check mnode status"
)
clusterComCheck
.
checkMnodeStatus
(
mnodeNums
)
# add some error operations and
tdLog
.
info
(
"Confirm the status of the dnode again"
)
...
...
tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py
浏览文件 @
06d538bf
...
...
@@ -126,14 +126,11 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
'%s:6030'
%
self
.
host
)
tdSql
.
checkData
(
4
,
1
,
'%s:6430'
%
self
.
host
)
clusterComCheck
.
checkDnodes
(
dnodeNumbers
)
clusterComCheck
.
checkMnodeStatus
(
1
)
# fisr add three mnodes;
tdLog
.
info
(
"fisr add three mnodes and check mnode status"
)
tdSql
.
execute
(
"create mnode on dnode 2"
)
clusterComCheck
.
checkMnodeStatus
(
2
)
tdSql
.
execute
(
"create mnode on dnode 3"
)
clusterComCheck
.
checkMnodeStatus
(
3
)
#check mnode status
tdLog
.
info
(
"check mnode status"
)
clusterComCheck
.
checkMnodeStatus
(
mnodeNums
)
# add some error operations and
tdLog
.
info
(
"Confirm the status of the dnode again"
)
...
...
tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py
浏览文件 @
06d538bf
...
...
@@ -126,14 +126,11 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
'%s:6030'
%
self
.
host
)
tdSql
.
checkData
(
4
,
1
,
'%s:6430'
%
self
.
host
)
clusterComCheck
.
checkDnodes
(
dnodeNumbers
)
clusterComCheck
.
checkMnodeStatus
(
1
)
# fisr add three mnodes;
tdLog
.
info
(
"fisr add three mnodes and check mnode status"
)
tdSql
.
execute
(
"create mnode on dnode 2"
)
clusterComCheck
.
checkMnodeStatus
(
2
)
tdSql
.
execute
(
"create mnode on dnode 3"
)
clusterComCheck
.
checkMnodeStatus
(
3
)
#check mnode status
tdLog
.
info
(
"check mnode status"
)
clusterComCheck
.
checkMnodeStatus
(
mnodeNums
)
# add some error operations and
tdLog
.
info
(
"Confirm the status of the dnode again"
)
...
...
tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py
浏览文件 @
06d538bf
...
...
@@ -120,14 +120,10 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
'%s:6030'
%
self
.
host
)
tdSql
.
checkData
(
4
,
1
,
'%s:6430'
%
self
.
host
)
clusterComCheck
.
checkDnodes
(
dnodeNumbers
)
clusterComCheck
.
checkMnodeStatus
(
1
)
# fisr add three mnodes;
tdLog
.
info
(
"fisr add three mnodes and check mnode status"
)
tdSql
.
execute
(
"create mnode on dnode 2"
)
clusterComCheck
.
checkMnodeStatus
(
2
)
tdSql
.
execute
(
"create mnode on dnode 3"
)
clusterComCheck
.
checkMnodeStatus
(
3
)
#check mnode status
tdLog
.
info
(
"check mnode status"
)
clusterComCheck
.
checkMnodeStatus
(
mnodeNums
)
# add some error operations and
tdLog
.
info
(
"Confirm the status of the dnode again"
)
...
...
@@ -199,7 +195,7 @@ class TDTestCase:
def
run
(
self
):
# print(self.master_dnode.cfgDict)
self
.
fiveDnodeThreeMnode
(
dnodeNumbers
=
6
,
mnodeNums
=
3
,
restartNumbers
=
10
,
stopRole
=
'dnode'
)
self
.
fiveDnodeThreeMnode
(
dnodeNumbers
=
6
,
mnodeNums
=
3
,
restartNumbers
=
4
,
stopRole
=
'dnode'
)
def
stop
(
self
):
tdSql
.
close
()
...
...
tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py
浏览文件 @
06d538bf
...
...
@@ -94,14 +94,10 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
'%s:6030'
%
self
.
host
)
tdSql
.
checkData
(
4
,
1
,
'%s:6430'
%
self
.
host
)
clusterComCheck
.
checkDnodes
(
dnodeNumbers
)
clusterComCheck
.
checkMnodeStatus
(
1
)
# fisr add three mnodes;
tdLog
.
info
(
"fisr add three mnodes and check mnode status"
)
tdSql
.
execute
(
"create mnode on dnode 2"
)
clusterComCheck
.
checkMnodeStatus
(
2
)
tdSql
.
execute
(
"create mnode on dnode 3"
)
clusterComCheck
.
checkMnodeStatus
(
3
)
#check mnode status
tdLog
.
info
(
"check mnode status"
)
clusterComCheck
.
checkMnodeStatus
(
mnodeNums
)
# add some error operations and
tdLog
.
info
(
"Confirm the status of the dnode again"
)
...
...
tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py
浏览文件 @
06d538bf
...
...
@@ -124,14 +124,10 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
'%s:6030'
%
self
.
host
)
tdSql
.
checkData
(
4
,
1
,
'%s:6430'
%
self
.
host
)
clusterComCheck
.
checkDnodes
(
dnodeNumbers
)
clusterComCheck
.
checkMnodeStatus
(
1
)
# fisr add three mnodes;
tdLog
.
info
(
"fisr add three mnodes and check mnode status"
)
tdSql
.
execute
(
"create mnode on dnode 2"
)
clusterComCheck
.
checkMnodeStatus
(
2
)
tdSql
.
execute
(
"create mnode on dnode 3"
)
clusterComCheck
.
checkMnodeStatus
(
3
)
#check mnode status
tdLog
.
info
(
"check mnode status"
)
clusterComCheck
.
checkMnodeStatus
(
mnodeNums
)
# add some error operations and
tdLog
.
info
(
"Confirm the status of the dnode again"
)
...
...
tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py
浏览文件 @
06d538bf
...
...
@@ -95,16 +95,10 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
'%s:6030'
%
self
.
host
)
tdSql
.
checkData
(
4
,
1
,
'%s:6430'
%
self
.
host
)
clusterComCheck
.
checkDnodes
(
dnodeNumbers
)
clusterComCheck
.
checkMnodeStatus
(
1
)
# fisr add three mnodes;
tdLog
.
info
(
"fisr add three mnodes and check mnode status"
)
tdLog
.
info
(
"create mnode on dnode 2"
)
tdSql
.
execute
(
"create mnode on dnode 2"
)
clusterComCheck
.
checkMnodeStatus
(
2
)
tdLog
.
info
(
"create mnode on dnode 3"
)
tdSql
.
execute
(
"create mnode on dnode 3"
)
clusterComCheck
.
checkMnodeStatus
(
3
)
#check mnode status
tdLog
.
info
(
"check mnode status"
)
clusterComCheck
.
checkMnodeStatus
(
mnodeNums
)
# add some error operations and
tdLog
.
info
(
"Confirm the status of the dnode again"
)
...
...
tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDbRep3.py
浏览文件 @
06d538bf
...
...
@@ -94,14 +94,10 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
'%s:6030'
%
self
.
host
)
tdSql
.
checkData
(
4
,
1
,
'%s:6430'
%
self
.
host
)
clusterComCheck
.
checkDnodes
(
dnodeNumbers
)
clusterComCheck
.
checkMnodeStatus
(
1
)
# fisr add three mnodes;
tdLog
.
info
(
"fisr add three mnodes and check mnode status"
)
tdSql
.
execute
(
"create mnode on dnode 2"
)
clusterComCheck
.
checkMnodeStatus
(
2
)
tdSql
.
execute
(
"create mnode on dnode 3"
)
clusterComCheck
.
checkMnodeStatus
(
3
)
#check mnode status
tdLog
.
info
(
"check mnode status"
)
clusterComCheck
.
checkMnodeStatus
(
mnodeNums
)
# add some error operations and
tdLog
.
info
(
"Confirm the status of the dnode again"
)
...
...
tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateStb.py
浏览文件 @
06d538bf
...
...
@@ -119,14 +119,10 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
'%s:6030'
%
self
.
host
)
tdSql
.
checkData
(
4
,
1
,
'%s:6430'
%
self
.
host
)
clusterComCheck
.
checkDnodes
(
dnodeNumbers
)
clusterComCheck
.
checkMnodeStatus
(
1
)
# fisr add three mnodes;
tdLog
.
info
(
"fisr add three mnodes and check mnode status"
)
tdSql
.
execute
(
"create mnode on dnode 2"
)
clusterComCheck
.
checkMnodeStatus
(
2
)
tdSql
.
execute
(
"create mnode on dnode 3"
)
clusterComCheck
.
checkMnodeStatus
(
3
)
#check mnode status
tdLog
.
info
(
"check mnode status"
)
clusterComCheck
.
checkMnodeStatus
(
mnodeNums
)
# add some error operations and
tdLog
.
info
(
"Confirm the status of the dnode again"
)
...
...
tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py
浏览文件 @
06d538bf
...
...
@@ -96,14 +96,10 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
'%s:6030'
%
self
.
host
)
tdSql
.
checkData
(
4
,
1
,
'%s:6430'
%
self
.
host
)
clusterComCheck
.
checkDnodes
(
dnodeNumbers
)
clusterComCheck
.
checkMnodeStatus
(
1
)
# fisr add three mnodes;
tdLog
.
info
(
"fisr add three mnodes and check mnode status"
)
tdSql
.
execute
(
"create mnode on dnode 2"
)
clusterComCheck
.
checkMnodeStatus
(
2
)
tdSql
.
execute
(
"create mnode on dnode 3"
)
clusterComCheck
.
checkMnodeStatus
(
3
)
#check mnode status
tdLog
.
info
(
"check mnode status"
)
clusterComCheck
.
checkMnodeStatus
(
mnodeNums
)
# add some error operations and
tdLog
.
info
(
"Confirm the status of the dnode again"
)
...
...
tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateStb.py
浏览文件 @
06d538bf
...
...
@@ -119,14 +119,10 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
'%s:6030'
%
self
.
host
)
tdSql
.
checkData
(
4
,
1
,
'%s:6430'
%
self
.
host
)
clusterComCheck
.
checkDnodes
(
dnodeNumbers
)
clusterComCheck
.
checkMnodeStatus
(
1
)
# fisr add three mnodes;
tdLog
.
info
(
"fisr add three mnodes and check mnode status"
)
tdSql
.
execute
(
"create mnode on dnode 2"
)
clusterComCheck
.
checkMnodeStatus
(
2
)
tdSql
.
execute
(
"create mnode on dnode 3"
)
clusterComCheck
.
checkMnodeStatus
(
3
)
#check mnode status
tdLog
.
info
(
"check mnode status"
)
clusterComCheck
.
checkMnodeStatus
(
mnodeNums
)
# add some error operations and
tdLog
.
info
(
"Confirm the status of the dnode again"
)
...
...
tests/system-test/6-cluster/5dnode3mnodeStop.py
浏览文件 @
06d538bf
...
...
@@ -75,14 +75,17 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
'%s:6030'
%
self
.
host
)
tdSql
.
checkData
(
4
,
1
,
'%s:6430'
%
self
.
host
)
clusterComCheck
.
checkDnodes
(
dnodenumbers
)
clusterComCheck
.
checkMnodeStatus
(
1
)
# fisr add three mnodes;
tdLog
.
info
(
"fisr add three mnodes and check mnode status"
)
tdSql
.
execute
(
"create mnode on dnode 2"
)
clusterComCheck
.
checkMnodeStatus
(
2
)
tdSql
.
execute
(
"create mnode on dnode 3"
)
clusterComCheck
.
checkMnodeStatus
(
3
)
#check mnode status
tdLog
.
info
(
"check mnode status"
)
clusterComCheck
.
checkMnodeStatus
(
mnodeNums
)
# # fisr add three mnodes;
# tdLog.info("check mnode status")
# # tdSql.execute("create mnode on dnode 2")
# clusterComCheck.checkMnodeStatus(2)
# # tdSql.execute("create mnode on dnode 3")
# clusterComCheck.checkMnodeStatus(3)
# add some error operations and
tdLog
.
info
(
"Confirm the status of the dnode again"
)
...
...
tests/system-test/6-cluster/5dnode3mnodeStop2Follower.py
浏览文件 @
06d538bf
...
...
@@ -75,14 +75,9 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
'%s:6030'
%
self
.
host
)
tdSql
.
checkData
(
4
,
1
,
'%s:6430'
%
self
.
host
)
clusterComCheck
.
checkDnodes
(
dnodenumbers
)
clusterComCheck
.
checkMnodeStatus
(
1
)
# fisr add three mnodes;
tdLog
.
info
(
"fisr add three mnodes and check mnode status"
)
tdSql
.
execute
(
"create mnode on dnode 2"
)
clusterComCheck
.
checkMnodeStatus
(
2
)
tdSql
.
execute
(
"create mnode on dnode 3"
)
clusterComCheck
.
checkMnodeStatus
(
3
)
tdLog
.
info
(
"check mnode status"
)
clusterComCheck
.
checkMnodeStatus
(
mnodeNums
)
# add some error operations and
tdLog
.
info
(
"Confirm the status of the dnode again"
)
...
...
tests/system-test/6-cluster/5dnode3mnodeStopConnect.py
浏览文件 @
06d538bf
...
...
@@ -75,15 +75,11 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
'%s:6030'
%
self
.
host
)
tdSql
.
checkData
(
4
,
1
,
'%s:6430'
%
self
.
host
)
clusterComCheck
.
checkDnodes
(
dnodenumbers
)
clusterComCheck
.
checkMnodeStatus
(
1
)
# fisr add three mnodes;
tdLog
.
info
(
"fisr add three mnodes and check mnode status"
)
tdSql
.
execute
(
"create mnode on dnode 2"
)
clusterComCheck
.
checkMnodeStatus
(
2
)
tdSql
.
execute
(
"create mnode on dnode 3"
)
clusterComCheck
.
checkMnodeStatus
(
3
)
#check mnode status
tdLog
.
info
(
"check mnode status"
)
clusterComCheck
.
checkMnodeStatus
(
mnodeNums
)
# add some error operations and
tdLog
.
info
(
"Confirm the status of the dnode again"
)
tdSql
.
error
(
"create mnode on dnode 2"
)
...
...
tests/system-test/6-cluster/5dnode3mnodeStopFollowerLeader.py
浏览文件 @
06d538bf
...
...
@@ -75,15 +75,11 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
'%s:6030'
%
self
.
host
)
tdSql
.
checkData
(
4
,
1
,
'%s:6430'
%
self
.
host
)
clusterComCheck
.
checkDnodes
(
dnodenumbers
)
clusterComCheck
.
checkMnodeStatus
(
1
)
# fisr add three mnodes;
tdLog
.
info
(
"fisr add three mnodes and check mnode status"
)
tdSql
.
execute
(
"create mnode on dnode 2"
)
clusterComCheck
.
checkMnodeStatus
(
2
)
tdSql
.
execute
(
"create mnode on dnode 3"
)
clusterComCheck
.
checkMnodeStatus
(
3
)
#check mnode status
tdLog
.
info
(
"check mnode status"
)
clusterComCheck
.
checkMnodeStatus
(
mnodeNums
)
# add some error operations and
tdLog
.
info
(
"Confirm the status of the dnode again"
)
tdSql
.
error
(
"create mnode on dnode 2"
)
...
...
tests/system-test/6-cluster/5dnode3mnodeStopLoop.py
浏览文件 @
06d538bf
...
...
@@ -75,14 +75,10 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
'%s:6030'
%
self
.
host
)
tdSql
.
checkData
(
4
,
1
,
'%s:6430'
%
self
.
host
)
clusterComCheck
.
checkDnodes
(
dnodenumbers
)
clusterComCheck
.
checkMnodeStatus
(
1
)
# fisr add three mnodes;
tdLog
.
info
(
"fisr add three mnodes and check mnode status"
)
tdSql
.
execute
(
"create mnode on dnode 2"
)
clusterComCheck
.
checkMnodeStatus
(
2
)
tdSql
.
execute
(
"create mnode on dnode 3"
)
clusterComCheck
.
checkMnodeStatus
(
3
)
#check mnode status
tdLog
.
info
(
"check mnode status"
)
clusterComCheck
.
checkMnodeStatus
(
mnodeNums
)
# add some error operations and
tdLog
.
info
(
"Confirm the status of the dnode again"
)
...
...
tests/system-test/fulltest.sh
浏览文件 @
06d538bf
...
...
@@ -232,9 +232,11 @@ python3 ./test.py -f 2-query/function_diff.py
python3 ./test.py
-f
2-query/queryQnode.py
python3 ./test.py
-f
6-cluster/5dnode1mnode.py
python3 ./test.py
-f
6-cluster/5dnode2mnode.py
-N
5
-M
3
python3 ./test.py
-f
6-cluster/5dnode2mnode.py
-N
5
python3 ./test.py
-f
6-cluster/5dnode3mnodeStop.py
-N
5
-M
3
python3 ./test.py
-f
6-cluster/5dnode3mnodeStop.py
-N
5
-M
3
-i
False
python3 ./test.py
-f
6-cluster/5dnode3mnodeStop2Follower.py
-N
5
-M
3
python3 ./test.py
-f
6-cluster/5dnode3mnodeStop2Follower.py
-N
5
-M
3
-i
False
python3 ./test.py
-f
6-cluster/5dnode3mnodeStopLoop.py
-N
5
-M
3
python3 ./test.py
-f
6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py
-N
6
-M
3
python3 ./test.py
-f
6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py
-N
6
-M
3
-n
3
...
...
tests/system-test/test.py
浏览文件 @
06d538bf
...
...
@@ -73,8 +73,9 @@ if __name__ == "__main__":
createDnodeNums
=
1
restful
=
False
replicaVar
=
1
opts
,
args
=
getopt
.
gnu_getopt
(
sys
.
argv
[
1
:],
'f:p:m:l:scghrd:k:e:N:M:Q:C:RD:n:'
,
[
'file='
,
'path='
,
'master'
,
'logSql'
,
'stop'
,
'cluster'
,
'valgrind'
,
'help'
,
'restart'
,
'updateCfgDict'
,
'killv'
,
'execCmd'
,
'dnodeNums'
,
'mnodeNums'
,
'queryPolicy'
,
'createDnodeNums'
,
'restful'
,
'adaptercfgupdate'
,
'replicaVar'
])
independentMnode
=
True
opts
,
args
=
getopt
.
gnu_getopt
(
sys
.
argv
[
1
:],
'f:p:m:l:scghrd:k:e:N:M:Q:C:RD:n:i:'
,
[
'file='
,
'path='
,
'master'
,
'logSql'
,
'stop'
,
'cluster'
,
'valgrind'
,
'help'
,
'restart'
,
'updateCfgDict'
,
'killv'
,
'execCmd'
,
'dnodeNums'
,
'mnodeNums'
,
'queryPolicy'
,
'createDnodeNums'
,
'restful'
,
'adaptercfgupdate'
,
'replicaVar'
,
'independentMnode'
])
for
key
,
value
in
opts
:
if
key
in
[
'-h'
,
'--help'
]:
tdLog
.
printNoPrefix
(
...
...
@@ -97,6 +98,8 @@ if __name__ == "__main__":
tdLog
.
printNoPrefix
(
'-R restful realization form'
)
tdLog
.
printNoPrefix
(
'-D taosadapter update cfg dict '
)
tdLog
.
printNoPrefix
(
'-n the number of replicas'
)
tdLog
.
printNoPrefix
(
'-i independentMnode Mnode'
)
sys
.
exit
(
0
)
if
key
in
[
'-r'
,
'--restart'
]:
...
...
@@ -158,6 +161,9 @@ if __name__ == "__main__":
if
key
in
[
'-C'
,
'--createDnodeNums'
]:
createDnodeNums
=
value
if
key
in
[
'-i'
,
'--independentMnode'
]:
independentMnode
=
value
if
key
in
[
'-R'
,
'--restful'
]:
restful
=
True
...
...
@@ -313,7 +319,7 @@ if __name__ == "__main__":
tdLog
.
exit
(
f
"alter queryPolicy to
{
queryPolicy
}
failed"
)
else
:
tdLog
.
debug
(
"create an cluster with %s nodes and make %s dnode as independent mnode"
%
(
dnodeNums
,
mnodeNums
))
dnodeslist
=
cluster
.
configure_cluster
(
dnodeNums
=
dnodeNums
,
mnodeNums
=
mnodeNums
)
dnodeslist
=
cluster
.
configure_cluster
(
dnodeNums
=
dnodeNums
,
mnodeNums
=
mnodeNums
,
independentMnode
=
independentMnode
)
tdDnodes
=
ClusterDnodes
(
dnodeslist
)
tdDnodes
.
init
(
deployPath
,
masterIp
)
tdDnodes
.
setTestCluster
(
testCluster
)
...
...
@@ -339,6 +345,7 @@ if __name__ == "__main__":
else
:
createDnodeNums
=
createDnodeNums
cluster
.
create_dnode
(
conn
,
createDnodeNums
)
cluster
.
create_mnode
(
conn
,
mnodeNums
)
try
:
if
cluster
.
check_dnode
(
conn
)
:
print
(
"check dnode ready"
)
...
...
@@ -446,7 +453,7 @@ if __name__ == "__main__":
else
:
tdLog
.
debug
(
"create an cluster with %s nodes and make %s dnode as independent mnode"
%
(
dnodeNums
,
mnodeNums
))
dnodeslist
=
cluster
.
configure_cluster
(
dnodeNums
=
dnodeNums
,
mnodeNums
=
mnodeNums
)
dnodeslist
=
cluster
.
configure_cluster
(
dnodeNums
=
dnodeNums
,
mnodeNums
=
mnodeNums
,
independentMnode
=
independentMnode
)
tdDnodes
=
ClusterDnodes
(
dnodeslist
)
tdDnodes
.
init
(
deployPath
,
masterIp
)
tdDnodes
.
setTestCluster
(
testCluster
)
...
...
@@ -472,6 +479,8 @@ if __name__ == "__main__":
else
:
createDnodeNums
=
createDnodeNums
cluster
.
create_dnode
(
conn
,
createDnodeNums
)
cluster
.
create_mnode
(
conn
,
mnodeNums
)
try
:
if
cluster
.
check_dnode
(
conn
)
:
print
(
"check dnode ready"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录