Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
85552c46
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看板
提交
85552c46
编写于
7月 28, 2022
作者:
W
wenzhouwww@live.cn
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update case and push to CI run
上级
6c1cd18c
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
337 addition
and
108 deletion
+337
-108
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py
...r/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py
+7
-6
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py
...mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py
+18
-4
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py
...r/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py
+9
-6
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py
...sic_replica3_insertdatas_querys_loop_restart_all_vnode.py
+2
-1
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py
...asic_replica3_insertdatas_querys_loop_restart_follower.py
+17
-2
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py
..._basic_replica3_insertdatas_querys_loop_restart_leader.py
+17
-3
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py
...dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py
+18
-4
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py
...de1mnode_basic_replica3_insertdatas_stop_follower_sync.py
+19
-4
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py
...1mnode_basic_replica3_insertdatas_stop_follower_unsync.py
+20
-5
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py
...c_replica3_insertdatas_stop_follower_unsync_force_stop.py
+34
-14
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py
...de/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py
+25
-11
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py
...ode_basic_replica3_insertdatas_stop_leader_forece_stop.py
+32
-16
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py
.../4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py
+6
-5
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py
...e/4dnode1mnode_basic_replica3_querydatas_stop_follower.py
+26
-10
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py
...ode_basic_replica3_querydatas_stop_follower_force_stop.py
+18
-3
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py
...ode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py
+18
-3
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py
...mnode_basic_replica3_querydatas_stop_leader_force_stop.py
+26
-10
tests/system-test/clusterCase.sh
tests/system-test/clusterCase.sh
+25
-1
未找到文件。
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py
浏览文件 @
85552c46
...
...
@@ -29,7 +29,8 @@ class TDTestCase:
self
.
replica
=
1
self
.
vgroups
=
1
self
.
tb_nums
=
10
self
.
row_nums
=
2000
self
.
row_nums
=
1000
self
.
query_times
=
1000
def
getBuildPath
(
self
):
selfPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
...
...
@@ -160,8 +161,8 @@ class TDTestCase:
def
check_insert_status
(
self
,
dbname
,
tb_nums
,
row_nums
):
newTdSql
=
tdCom
.
newTdSql
()
def
check_insert_status
(
self
,
newTdSql
,
dbname
,
tb_nums
,
row_nums
):
#
newTdSql=tdCom.newTdSql()
newTdSql
.
execute
(
"use {}"
.
format
(
dbname
))
newTdSql
.
query
(
"select count(*) from {}.{}"
.
format
(
dbname
,
'stb1'
))
# tdSql.checkData(0 , 0 , tb_nums*row_nums)
...
...
@@ -169,10 +170,10 @@ class TDTestCase:
# tdSql.checkRows(tb_nums)
def
loop_query_constantly
(
self
,
times
,
db_name
,
tb_nums
,
row_nums
):
newTdSql
=
tdCom
.
newTdSql
()
for
loop_time
in
range
(
times
):
tdLog
.
debug
(
" === query is going ,this is {}_th query === "
.
format
(
loop_time
))
self
.
check_insert_status
(
db_name
,
tb_nums
,
row_nums
)
self
.
check_insert_status
(
newTdSql
,
db_name
,
tb_nums
,
row_nums
)
def
run
(
self
):
self
.
check_setup_cluster_status
()
...
...
@@ -187,7 +188,7 @@ class TDTestCase:
time
.
sleep
(
0.1
)
tdSql
.
query
(
" show {}.stables "
.
format
(
self
.
db_name
))
reading
=
threading
.
Thread
(
target
=
self
.
loop_query_constantly
,
args
=
(
1000
,
self
.
db_name
,
self
.
tb_nums
,
self
.
row_nums
))
reading
=
threading
.
Thread
(
target
=
self
.
loop_query_constantly
,
args
=
(
self
.
query_times
,
self
.
db_name
,
self
.
tb_nums
,
self
.
row_nums
))
reading
.
start
()
writing
.
join
()
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py
浏览文件 @
85552c46
...
...
@@ -181,20 +181,34 @@ class TDTestCase:
tdLog
.
debug
(
" ==== check insert tbnames first failed , this is {}_th retry check tbnames of database {}"
.
format
(
count
,
dbname
))
count
+=
1
def
_get_stop_dnode_id
(
self
,
dbname
,
role
):
def
_get_stop_dnode_id
(
self
,
dbname
,
dnode_role
):
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
status
=
False
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
while
status
!=
True
:
time
.
sleep
(
0.1
)
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
# print(status)
for
vgroup_info
in
vgroup_infos
:
leader_infos
=
vgroup_info
[
3
:
-
4
]
# print(vgroup_info)
for
ind
,
role
in
enumerate
(
leader_infos
):
if
role
==
role
:
if
role
==
dnode_
role
:
# print(ind,leader_infos)
self
.
stop_dnode_id
=
leader_infos
[
ind
-
1
]
break
return
self
.
stop_dnode_id
def
wait_stop_dnode_OK
(
self
,
newTdSql
):
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py
浏览文件 @
85552c46
...
...
@@ -29,7 +29,8 @@ class TDTestCase:
self
.
replica
=
3
self
.
vgroups
=
1
self
.
tb_nums
=
10
self
.
row_nums
=
2000
self
.
row_nums
=
1000
self
.
query_times
=
1000
def
getBuildPath
(
self
):
selfPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
...
...
@@ -153,6 +154,8 @@ class TDTestCase:
# insert datas about new database
for
row_num
in
range
(
row_nums
):
if
row_num
%
100
==
0
:
tdLog
.
info
(
" === writing is going now === "
)
ts
=
self
.
ts
+
1000
*
row_num
newTdSql
.
execute
(
f
"insert into
{
sub_tbname
}
values (
{
ts
}
,
{
row_num
}
,
{
row_num
}
, 10 ,1 ,
{
row_num
}
,
{
row_num
}
,true,'bin_
{
row_num
}
','nchar_
{
row_num
}
',now) "
)
...
...
@@ -160,8 +163,8 @@ class TDTestCase:
def
check_insert_status
(
self
,
dbname
,
tb_nums
,
row_nums
):
newTdSql
=
tdCom
.
newTdSql
()
def
check_insert_status
(
self
,
newTdSql
,
dbname
,
tb_nums
,
row_nums
):
newTdSql
.
execute
(
"use {}"
.
format
(
dbname
))
newTdSql
.
query
(
"select count(*) from {}.{}"
.
format
(
dbname
,
'stb1'
))
# tdSql.checkData(0 , 0 , tb_nums*row_nums)
...
...
@@ -169,10 +172,10 @@ class TDTestCase:
# tdSql.checkRows(tb_nums)
def
loop_query_constantly
(
self
,
times
,
db_name
,
tb_nums
,
row_nums
):
newTdSql
=
tdCom
.
newTdSql
()
for
loop_time
in
range
(
times
):
tdLog
.
debug
(
" === query is going ,this is {}_th query === "
.
format
(
loop_time
))
self
.
check_insert_status
(
db_name
,
tb_nums
,
row_nums
)
self
.
check_insert_status
(
newTdSql
,
db_name
,
tb_nums
,
row_nums
)
def
run
(
self
):
self
.
check_setup_cluster_status
()
...
...
@@ -187,7 +190,7 @@ class TDTestCase:
time
.
sleep
(
0.1
)
tdSql
.
query
(
" show {}.stables "
.
format
(
self
.
db_name
))
reading
=
threading
.
Thread
(
target
=
self
.
loop_query_constantly
,
args
=
(
1000
,
self
.
db_name
,
self
.
tb_nums
,
self
.
row_nums
))
reading
=
threading
.
Thread
(
target
=
self
.
loop_query_constantly
,
args
=
(
self
.
query_times
,
self
.
db_name
,
self
.
tb_nums
,
self
.
row_nums
))
reading
.
start
()
writing
.
join
()
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py
浏览文件 @
85552c46
...
...
@@ -29,7 +29,7 @@ class TDTestCase:
self
.
replica
=
3
self
.
vgroups
=
1
self
.
tb_nums
=
10
self
.
row_nums
=
10
00
self
.
row_nums
=
5
00
self
.
max_restart_time
=
20
self
.
restart_server_times
=
10
self
.
dnode_index
=
0
...
...
@@ -312,6 +312,7 @@ class TDTestCase:
tdLog
.
notice
(
" === this is {}_th restart taosd === "
.
format
(
loop_time
))
# begin start dnode
start
=
time
.
time
()
tdDnodes
[
self
.
stop_dnode_id
-
1
].
starttaosd
()
self
.
wait_start_dnode_OK
(
newTdSql
)
time
.
sleep
(
5
)
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py
浏览文件 @
85552c46
...
...
@@ -163,10 +163,25 @@ class TDTestCase:
tdLog
.
notice
(
" ==== create database {} and insert rows execute end ====="
.
format
(
dbname
))
def
_get_stop_dnode_id
(
self
,
dbname
,
dnode_role
):
def
_get_stop_dnode_id
(
self
,
dbname
,
dnode_role
):
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
status
=
False
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
while
status
!=
True
:
time
.
sleep
(
0.1
)
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
# print(status)
for
vgroup_info
in
vgroup_infos
:
leader_infos
=
vgroup_info
[
3
:
-
4
]
# print(vgroup_info)
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py
浏览文件 @
85552c46
...
...
@@ -162,11 +162,25 @@ class TDTestCase:
tdLog
.
notice
(
" ==== create database {} and insert rows execute end ====="
.
format
(
dbname
))
def
_get_stop_dnode_id
(
self
,
dbname
,
dnode_role
):
def
_get_stop_dnode_id
(
self
,
dbname
,
dnode_role
):
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
status
=
False
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
while
status
!=
True
:
time
.
sleep
(
0.1
)
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
# print(status)
for
vgroup_info
in
vgroup_infos
:
leader_infos
=
vgroup_info
[
3
:
-
4
]
# print(vgroup_info)
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py
浏览文件 @
85552c46
...
...
@@ -181,20 +181,34 @@ class TDTestCase:
tdLog
.
debug
(
" ==== check insert tbnames first failed , this is {}_th retry check tbnames of database {}"
.
format
(
count
,
dbname
))
count
+=
1
def
_get_stop_dnode_id
(
self
,
dbname
,
role
):
def
_get_stop_dnode_id
(
self
,
dbname
,
dnode_role
):
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
status
=
False
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
while
status
!=
True
:
time
.
sleep
(
0.1
)
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
# print(status)
for
vgroup_info
in
vgroup_infos
:
leader_infos
=
vgroup_info
[
3
:
-
4
]
# print(vgroup_info)
for
ind
,
role
in
enumerate
(
leader_infos
):
if
role
==
role
:
if
role
==
dnode_
role
:
# print(ind,leader_infos)
self
.
stop_dnode_id
=
leader_infos
[
ind
-
1
]
break
return
self
.
stop_dnode_id
def
wait_stop_dnode_OK
(
self
,
newTdSql
):
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py
浏览文件 @
85552c46
...
...
@@ -221,20 +221,35 @@ class TDTestCase:
tdLog
.
debug
(
" ==== check insert tbnames first failed , this is {}_th retry check tbnames of database {}"
.
format
(
count
,
dbname
))
count
+=
1
def
_get_stop_dnode_id
(
self
,
dbname
,
dnode_role
):
def
_get_stop_dnode_id
(
self
,
dbname
,
dnode_role
):
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
status
=
False
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
while
status
!=
True
:
time
.
sleep
(
0.1
)
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
# print(status)
for
vgroup_info
in
vgroup_infos
:
leader_infos
=
vgroup_info
[
3
:
-
4
]
# print(vgroup_info)
for
ind
,
role
in
enumerate
(
leader_infos
):
if
dnode_role
==
role
:
if
role
==
dnode_
role
:
# print(ind,leader_infos)
self
.
stop_dnode_id
=
leader_infos
[
ind
-
1
]
break
return
self
.
stop_dnode_id
def
wait_stop_dnode_OK
(
self
,
newTdSql
):
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py
浏览文件 @
85552c46
...
...
@@ -221,19 +221,34 @@ class TDTestCase:
tdLog
.
notice
(
" ==== check insert tbnames first failed , this is {}_th retry check tbnames of database {}"
.
format
(
count
,
dbname
))
count
+=
1
def
_get_stop_dnode_id
(
self
,
dbname
):
def
_get_stop_dnode_id
(
self
,
dbname
,
dnode_role
):
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
status
=
False
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
while
status
!=
True
:
time
.
sleep
(
0.1
)
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
# print(status)
for
vgroup_info
in
vgroup_infos
:
leader_infos
=
vgroup_info
[
3
:
-
4
]
# print(vgroup_info)
for
ind
,
role
in
enumerate
(
leader_infos
):
if
role
==
'follower'
:
if
role
==
dnode_role
:
# print(ind,leader_infos)
self
.
stop_dnode_id
=
leader_infos
[
ind
-
1
]
break
return
self
.
stop_dnode_id
def
wait_stop_dnode_OK
(
self
,
newTdSql
):
...
...
@@ -376,7 +391,7 @@ class TDTestCase:
stablename
=
'stable_{}'
.
format
(
loop
)
self
.
create_database
(
dbname
=
db_name
,
replica_num
=
self
.
replica
,
vgroup_nums
=
1
)
self
.
create_stable_insert_datas
(
dbname
=
db_name
,
stablename
=
stablename
,
tb_nums
=
10
,
row_nums
=
10
)
self
.
stop_dnode_id
=
self
.
_get_stop_dnode_id
(
db_name
)
self
.
stop_dnode_id
=
self
.
_get_stop_dnode_id
(
db_name
,
"follower"
)
# print("dnode_id:" , self.stop_dnode_id )
# check rows of datas
...
...
@@ -423,7 +438,7 @@ class TDTestCase:
newTdSql
=
tdCom
.
newTdSql
()
start
=
time
.
time
()
tdDnodes
=
cluster
.
dnodes
self
.
stop_dnode_id
=
self
.
_get_stop_dnode_id
(
dbname
)
self
.
stop_dnode_id
=
self
.
_get_stop_dnode_id
(
dbname
,
"follower"
)
# print("dnode_id:" , self.stop_dnode_id )
# begin restart dnode
tdDnodes
[
self
.
stop_dnode_id
-
1
].
stoptaosd
()
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py
浏览文件 @
85552c46
...
...
@@ -221,25 +221,40 @@ class TDTestCase:
tdLog
.
notice
(
" ==== check insert tbnames first failed , this is {}_th retry check tbnames of database {}"
.
format
(
count
,
dbname
))
count
+=
1
def
_get_stop_dnode_id
(
self
,
dbname
):
def
_get_stop_dnode_id
(
self
,
dbname
,
dnode_role
):
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
status
=
False
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
while
status
!=
True
:
time
.
sleep
(
0.1
)
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
# print(status)
for
vgroup_info
in
vgroup_infos
:
leader_infos
=
vgroup_info
[
3
:
-
4
]
# print(vgroup_info)
for
ind
,
role
in
enumerate
(
leader_infos
):
if
role
==
'follower'
:
if
role
==
dnode_role
:
# print(ind,leader_infos)
self
.
stop_dnode_id
=
leader_infos
[
ind
-
1
]
break
return
self
.
stop_dnode_id
def
wait_stop_dnode_OK
(
self
):
def
wait_stop_dnode_OK
(
self
,
newTdSql
):
def
_get_status
():
newTdSql
=
tdCom
.
newTdSql
()
#
newTdSql=tdCom.newTdSql()
status
=
""
newTdSql
.
query
(
"show dnodes"
)
...
...
@@ -259,10 +274,10 @@ class TDTestCase:
# tdLog.notice("==== stop dnode has not been stopped , endpoint is {}".format(self.stop_dnode))
tdLog
.
notice
(
"==== stop_dnode has stopped , id is {}"
.
format
(
self
.
stop_dnode_id
))
def
wait_start_dnode_OK
(
self
):
def
wait_start_dnode_OK
(
self
,
newTdSql
):
def
_get_status
():
newTdSql
=
tdCom
.
newTdSql
()
#
newTdSql=tdCom.newTdSql()
status
=
""
newTdSql
.
query
(
"show dnodes"
)
dnode_infos
=
newTdSql
.
queryResult
...
...
@@ -370,12 +385,13 @@ class TDTestCase:
def
sync_run_case
(
self
):
# stop follower and insert datas , update tables and create new stables
tdDnodes
=
cluster
.
dnodes
newTdSql
=
tdCom
.
newTdSql
()
for
loop
in
range
(
self
.
loop_restart_times
):
db_name
=
"sync_db_{}"
.
format
(
loop
)
stablename
=
'stable_{}'
.
format
(
loop
)
self
.
create_database
(
dbname
=
db_name
,
replica_num
=
self
.
replica
,
vgroup_nums
=
1
)
self
.
create_stable_insert_datas
(
dbname
=
db_name
,
stablename
=
stablename
,
tb_nums
=
10
,
row_nums
=
10
)
self
.
stop_dnode_id
=
self
.
_get_stop_dnode_id
(
db_name
)
self
.
stop_dnode_id
=
self
.
_get_stop_dnode_id
(
db_name
,
"follower"
)
# check rows of datas
...
...
@@ -385,7 +401,7 @@ class TDTestCase:
start
=
time
.
time
()
tdDnodes
[
self
.
stop_dnode_id
-
1
].
forcestop
()
self
.
wait_stop_dnode_OK
()
self
.
wait_stop_dnode_OK
(
newTdSql
)
# append rows of stablename when dnode stop
...
...
@@ -403,7 +419,7 @@ class TDTestCase:
# begin start dnode
tdDnodes
[
self
.
stop_dnode_id
-
1
].
starttaosd
()
self
.
wait_start_dnode_OK
()
self
.
wait_start_dnode_OK
(
newTdSql
)
end
=
time
.
time
()
time_cost
=
int
(
end
-
start
)
if
time_cost
>
self
.
max_restart_time
:
...
...
@@ -420,17 +436,21 @@ class TDTestCase:
def
_restart_dnode_of_db_unsync
(
dbname
):
start
=
time
.
time
()
tdDnodes
=
cluster
.
dnodes
self
.
stop_dnode_id
=
self
.
_get_stop_dnode_id
(
dbname
)
newTdSql
=
tdCom
.
newTdSql
()
self
.
stop_dnode_id
=
self
.
_get_stop_dnode_id
(
dbname
,
"follower"
)
# print(self.stop_dnode_id)
while
not
self
.
stop_dnode_id
:
# print(self.stop_dnode_id)
time
.
sleep
(
0.5
)
self
.
stop_dnode_id
=
self
.
_get_stop_dnode_id
(
dbname
)
self
.
stop_dnode_id
=
self
.
_get_stop_dnode_id
(
dbname
,
"follower"
)
# begin restart dnode
# force stop taosd by kill -9
self
.
force_stop_dnode
(
self
.
stop_dnode_id
)
self
.
wait_stop_dnode_OK
()
self
.
wait_stop_dnode_OK
(
newTdSql
)
os
.
system
(
" taos -s 'show dnodes;' "
)
tdDnodes
[
self
.
stop_dnode_id
-
1
].
starttaosd
()
self
.
wait_start_dnode_OK
()
self
.
wait_start_dnode_OK
(
newTdSql
)
end
=
time
.
time
()
time_cost
=
int
(
end
-
start
)
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py
浏览文件 @
85552c46
...
...
@@ -177,26 +177,40 @@ class TDTestCase:
continue
def
_get_stop_dnode_id
(
self
,
dbname
):
newTdSql
=
tdCom
.
newTdSql
()
newTdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
newTdSql
.
queryResult
def
_get_stop_dnode_id
(
self
,
dbname
,
dnode_role
):
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
status
=
False
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
while
status
!=
True
:
time
.
sleep
(
0.1
)
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
# print(status)
for
vgroup_info
in
vgroup_infos
:
leader_infos
=
vgroup_info
[
3
:
-
4
]
# print(vgroup_info)
for
ind
,
role
in
enumerate
(
leader_infos
):
if
role
==
'leader'
:
if
role
==
dnode_role
:
# print(ind,leader_infos)
self
.
stop_dnode_id
=
leader_infos
[
ind
-
1
]
break
return
self
.
stop_dnode_id
def
wait_stop_dnode_OK
(
self
):
def
wait_stop_dnode_OK
(
self
,
newTdSql
):
def
_get_status
():
newTdSql
=
tdCom
.
newTdSql
()
#
newTdSql=tdCom.newTdSql()
status
=
""
newTdSql
.
query
(
"show dnodes"
)
...
...
@@ -216,10 +230,10 @@ class TDTestCase:
# tdLog.notice("==== stop dnode has not been stopped , endpoint is {}".format(self.stop_dnode))
tdLog
.
notice
(
"==== stop_dnode has stopped , id is {}"
.
format
(
self
.
stop_dnode_id
))
def
wait_start_dnode_OK
(
self
):
def
wait_start_dnode_OK
(
self
,
newTdSql
):
def
_get_status
():
newTdSql
=
tdCom
.
newTdSql
()
#
newTdSql=tdCom.newTdSql()
status
=
""
newTdSql
.
query
(
"show dnodes"
)
dnode_infos
=
newTdSql
.
queryResult
...
...
@@ -316,7 +330,7 @@ class TDTestCase:
tdLog
.
debug
(
" === database {} has write {} rows at least ===="
.
format
(
dbname
,
total_rows
/
10
))
self
.
stop_dnode_id
=
self
.
_get_stop_dnode_id
(
dbname
)
self
.
stop_dnode_id
=
self
.
_get_stop_dnode_id
(
dbname
,
"leader"
)
# prepare stop leader of database
before_leader_infos
=
self
.
get_leader_infos
(
dbname
)
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py
浏览文件 @
85552c46
...
...
@@ -304,26 +304,40 @@ class TDTestCase:
tdLog
.
notice
(
" ==== check insert tbnames first failed , this is {}_th retry check tbnames of database {}"
.
format
(
count
,
dbname
))
count
+=
1
def
_get_stop_dnode_id
(
self
,
dbname
):
newTdSql
=
tdCom
.
newTdSql
()
newTdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
newTdSql
.
queryResult
def
_get_stop_dnode_id
(
self
,
dbname
,
dnode_role
):
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
status
=
False
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
while
status
!=
True
:
time
.
sleep
(
0.1
)
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
# print(status)
for
vgroup_info
in
vgroup_infos
:
leader_infos
=
vgroup_info
[
3
:
-
4
]
# print(vgroup_info)
for
ind
,
role
in
enumerate
(
leader_infos
):
if
role
==
'leader'
:
if
role
==
dnode_role
:
# print(ind,leader_infos)
self
.
stop_dnode_id
=
leader_infos
[
ind
-
1
]
break
return
self
.
stop_dnode_id
def
wait_stop_dnode_OK
(
self
):
def
wait_stop_dnode_OK
(
self
,
newTdSql
):
def
_get_status
():
newTdSql
=
tdCom
.
newTdSql
()
#
newTdSql=tdCom.newTdSql()
status
=
""
newTdSql
.
query
(
"show dnodes"
)
...
...
@@ -343,10 +357,10 @@ class TDTestCase:
# tdLog.notice("==== stop dnode has not been stopped , endpoint is {}".format(self.stop_dnode))
tdLog
.
notice
(
"==== stop_dnode has stopped , id is {}"
.
format
(
self
.
stop_dnode_id
))
def
wait_start_dnode_OK
(
self
):
def
wait_start_dnode_OK
(
self
,
newTdSql
):
def
_get_status
():
newTdSql
=
tdCom
.
newTdSql
()
#
newTdSql=tdCom.newTdSql()
status
=
""
newTdSql
.
query
(
"show dnodes"
)
dnode_infos
=
newTdSql
.
queryResult
...
...
@@ -421,12 +435,13 @@ class TDTestCase:
def
sync_run_case
(
self
):
# stop follower and insert datas , update tables and create new stables
tdDnodes
=
cluster
.
dnodes
newTdSql
=
tdCom
.
newTdSql
()
for
loop
in
range
(
self
.
loop_restart_times
):
db_name
=
"sync_db_{}"
.
format
(
loop
)
stablename
=
'stable_{}'
.
format
(
loop
)
self
.
create_database
(
dbname
=
db_name
,
replica_num
=
self
.
replica
,
vgroup_nums
=
1
)
self
.
create_stable_insert_datas
(
dbname
=
db_name
,
stablename
=
stablename
,
tb_nums
=
10
,
row_nums
=
10
)
self
.
stop_dnode_id
=
self
.
_get_stop_dnode_id
(
db_name
)
self
.
stop_dnode_id
=
self
.
_get_stop_dnode_id
(
db_name
,
"leader"
)
# check rows of datas
...
...
@@ -439,7 +454,7 @@ class TDTestCase:
# force stop taosd by kill -9
self
.
force_stop_dnode
(
self
.
stop_dnode_id
)
self
.
wait_stop_dnode_OK
()
self
.
wait_stop_dnode_OK
(
newTdSql
)
# vote leaders check
...
...
@@ -474,7 +489,7 @@ class TDTestCase:
# begin start dnode
start
=
time
.
time
()
tdDnodes
[
self
.
stop_dnode_id
-
1
].
starttaosd
()
self
.
wait_start_dnode_OK
()
self
.
wait_start_dnode_OK
(
newTdSql
)
end
=
time
.
time
()
time_cost
=
int
(
end
-
start
)
if
time_cost
>
self
.
max_restart_time
:
...
...
@@ -491,14 +506,15 @@ class TDTestCase:
def
_restart_dnode_of_db_unsync
(
dbname
):
tdDnodes
=
cluster
.
dnodes
self
.
stop_dnode_id
=
self
.
_get_stop_dnode_id
(
dbname
)
newTdSql
=
tdCom
.
newTdSql
()
self
.
stop_dnode_id
=
self
.
_get_stop_dnode_id
(
dbname
,
"leader"
)
# begin restart dnode
# force stop taosd by kill -9
# get leader info before stop
before_leader_infos
=
self
.
get_leader_infos
(
db_name
)
self
.
force_stop_dnode
(
self
.
stop_dnode_id
)
self
.
wait_stop_dnode_OK
()
self
.
wait_stop_dnode_OK
(
newTdSql
)
# check revote leader when restart servers
# get leader info after stop
...
...
@@ -530,7 +546,7 @@ class TDTestCase:
tdDnodes
[
self
.
stop_dnode_id
-
1
].
starttaosd
()
start
=
time
.
time
()
self
.
wait_start_dnode_OK
()
self
.
wait_start_dnode_OK
(
newTdSql
)
end
=
time
.
time
()
time_cost
=
int
(
end
-
start
)
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py
浏览文件 @
85552c46
...
...
@@ -30,6 +30,7 @@ class TDTestCase:
self
.
vgroups
=
1
self
.
tb_nums
=
10
self
.
row_nums
=
2000
self
.
query_times
=
100
def
getBuildPath
(
self
):
selfPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
...
...
@@ -160,8 +161,8 @@ class TDTestCase:
def
check_insert_status
(
self
,
dbname
,
tb_nums
,
row_nums
):
newTdSql
=
tdCom
.
newTdSql
()
def
check_insert_status
(
self
,
newTdSql
,
dbname
,
tb_nums
,
row_nums
):
#
newTdSql=tdCom.newTdSql()
newTdSql
.
execute
(
"use {}"
.
format
(
dbname
))
newTdSql
.
query
(
"select count(*) from {}.{}"
.
format
(
dbname
,
'stb1'
))
# tdSql.checkData(0 , 0 , tb_nums*row_nums)
...
...
@@ -175,12 +176,12 @@ class TDTestCase:
self
.
check_insert_status
(
db_name
,
tb_nums
,
row_nums
)
def
loop_create_databases
(
self
,
times
,
tb_nums
,
row_nums
):
newTdSql
=
tdCom
.
newTdSql
()
for
loop_time
in
range
(
times
):
tdLog
.
debug
(
" === create database and insert datas is going ,this is {}_th create === "
.
format
(
loop_time
))
db_name
=
'loop_db_{}'
.
format
(
loop_time
)
self
.
create_db_replica_3_insertdatas
(
db_name
,
self
.
replica
,
self
.
vgroups
,
tb_nums
,
row_nums
)
self
.
check_insert_status
(
db_name
,
tb_nums
,
row_nums
)
self
.
check_insert_status
(
newTdSql
,
db_name
,
tb_nums
,
row_nums
)
def
run
(
self
):
self
.
check_setup_cluster_status
()
...
...
@@ -199,7 +200,7 @@ class TDTestCase:
time
.
sleep
(
0.1
)
tdSql
.
query
(
" show {}.stables "
.
format
(
self
.
db_name
))
reading
=
threading
.
Thread
(
target
=
self
.
loop_query_constantly
,
args
=
(
1000
,
self
.
db_name
,
self
.
tb_nums
,
self
.
row_nums
))
reading
=
threading
.
Thread
(
target
=
self
.
loop_query_constantly
,
args
=
(
self
.
query_times
,
self
.
db_name
,
self
.
tb_nums
,
self
.
row_nums
))
reading
.
start
()
create_db
=
threading
.
Thread
(
target
=
self
.
loop_create_databases
,
args
=
(
10
,
10
,
10
))
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py
浏览文件 @
85552c46
...
...
@@ -182,25 +182,40 @@ class TDTestCase:
tdLog
.
notice
(
" ==== check insert tbnames first failed , this is {}_th retry check tbnames of database {}"
.
format
(
count
,
dbname
))
count
+=
1
def
_get_stop_dnode_id
(
self
,
dbname
):
def
_get_stop_dnode_id
(
self
,
dbname
,
dnode_role
):
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
status
=
False
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
while
status
!=
True
:
time
.
sleep
(
0.1
)
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
# print(status)
for
vgroup_info
in
vgroup_infos
:
leader_infos
=
vgroup_info
[
3
:
-
4
]
# print(vgroup_info)
for
ind
,
role
in
enumerate
(
leader_infos
):
if
role
==
'follower'
:
if
role
==
dnode_role
:
# print(ind,leader_infos)
self
.
stop_dnode_id
=
leader_infos
[
ind
-
1
]
break
return
self
.
stop_dnode_id
def
wait_stop_dnode_OK
(
self
):
def
wait_stop_dnode_OK
(
self
,
newTdSql
):
def
_get_status
():
newTdSql
=
tdCom
.
newTdSql
()
#
newTdSql=tdCom.newTdSql()
status
=
""
newTdSql
.
query
(
"show dnodes"
)
...
...
@@ -220,10 +235,10 @@ class TDTestCase:
# tdLog.notice("==== stop dnode has not been stopped , endpoint is {}".format(self.stop_dnode))
tdLog
.
notice
(
"==== stop_dnode has stopped , id is {}"
.
format
(
self
.
stop_dnode_id
))
def
wait_start_dnode_OK
(
self
):
def
wait_start_dnode_OK
(
self
,
newTdSql
):
def
_get_status
():
newTdSql
=
tdCom
.
newTdSql
()
#
newTdSql=tdCom.newTdSql()
status
=
""
newTdSql
.
query
(
"show dnodes"
)
dnode_infos
=
newTdSql
.
queryResult
...
...
@@ -372,6 +387,7 @@ class TDTestCase:
def
stop_follower_when_query_going
(
self
):
tdDnodes
=
cluster
.
dnodes
newTdSql
=
tdCom
.
newTdSql
()
self
.
create_database
(
dbname
=
self
.
db_name
,
replica_num
=
self
.
replica
,
vgroup_nums
=
1
)
self
.
create_stable_insert_datas
(
dbname
=
self
.
db_name
,
stablename
=
"stb1"
,
tb_nums
=
self
.
tb_nums
,
row_nums
=
self
.
row_nums
)
...
...
@@ -381,13 +397,13 @@ class TDTestCase:
# force stop follower
for
loop
in
range
(
self
.
loop_restart_times
):
tdLog
.
debug
(
" ==== this is {}_th restart follower of database {} ==== "
.
format
(
loop
,
self
.
db_name
))
self
.
stop_dnode_id
=
self
.
_get_stop_dnode_id
(
self
.
db_name
)
self
.
stop_dnode_id
=
self
.
_get_stop_dnode_id
(
self
.
db_name
,
"follower"
)
tdDnodes
[
self
.
stop_dnode_id
-
1
].
stoptaosd
()
self
.
wait_stop_dnode_OK
()
self
.
wait_stop_dnode_OK
(
newTdSql
)
start
=
time
.
time
()
tdDnodes
[
self
.
stop_dnode_id
-
1
].
starttaosd
()
self
.
wait_start_dnode_OK
()
self
.
wait_start_dnode_OK
(
newTdSql
)
end
=
time
.
time
()
time_cost
=
int
(
end
-
start
)
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py
浏览文件 @
85552c46
...
...
@@ -182,19 +182,34 @@ class TDTestCase:
tdLog
.
notice
(
" ==== check insert tbnames first failed , this is {}_th retry check tbnames of database {}"
.
format
(
count
,
dbname
))
count
+=
1
def
_get_stop_dnode_id
(
self
,
dbname
):
def
_get_stop_dnode_id
(
self
,
dbname
,
dnode_role
):
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
status
=
False
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
while
status
!=
True
:
time
.
sleep
(
0.1
)
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
# print(status)
for
vgroup_info
in
vgroup_infos
:
leader_infos
=
vgroup_info
[
3
:
-
4
]
# print(vgroup_info)
for
ind
,
role
in
enumerate
(
leader_infos
):
if
role
==
'follower'
:
if
role
==
dnode_role
:
# print(ind,leader_infos)
self
.
stop_dnode_id
=
leader_infos
[
ind
-
1
]
break
return
self
.
stop_dnode_id
def
wait_stop_dnode_OK
(
self
):
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py
浏览文件 @
85552c46
...
...
@@ -182,19 +182,34 @@ class TDTestCase:
tdLog
.
notice
(
" ==== check insert tbnames first failed , this is {}_th retry check tbnames of database {}"
.
format
(
count
,
dbname
))
count
+=
1
def
_get_stop_dnode_id
(
self
,
dbname
):
def
_get_stop_dnode_id
(
self
,
dbname
,
dnode_role
):
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
status
=
False
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
while
status
!=
True
:
time
.
sleep
(
0.1
)
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
# print(status)
for
vgroup_info
in
vgroup_infos
:
leader_infos
=
vgroup_info
[
3
:
-
4
]
# print(vgroup_info)
for
ind
,
role
in
enumerate
(
leader_infos
):
if
role
==
'leader'
:
if
role
==
dnode_role
:
# print(ind,leader_infos)
self
.
stop_dnode_id
=
leader_infos
[
ind
-
1
]
break
return
self
.
stop_dnode_id
def
wait_stop_dnode_OK
(
self
,
newTdSql
):
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py
浏览文件 @
85552c46
...
...
@@ -182,25 +182,40 @@ class TDTestCase:
tdLog
.
notice
(
" ==== check insert tbnames first failed , this is {}_th retry check tbnames of database {}"
.
format
(
count
,
dbname
))
count
+=
1
def
_get_stop_dnode_id
(
self
,
dbname
):
def
_get_stop_dnode_id
(
self
,
dbname
,
dnode_role
):
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
status
=
False
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
while
status
!=
True
:
time
.
sleep
(
0.1
)
tdSql
.
query
(
"show {}.vgroups"
.
format
(
dbname
))
vgroup_infos
=
tdSql
.
queryResult
for
vgroup_info
in
vgroup_infos
:
if
"error"
not
in
vgroup_info
:
status
=
True
else
:
status
=
False
# print(status)
for
vgroup_info
in
vgroup_infos
:
leader_infos
=
vgroup_info
[
3
:
-
4
]
# print(vgroup_info)
for
ind
,
role
in
enumerate
(
leader_infos
):
if
role
==
'leader'
:
if
role
==
dnode_role
:
# print(ind,leader_infos)
self
.
stop_dnode_id
=
leader_infos
[
ind
-
1
]
break
return
self
.
stop_dnode_id
def
wait_stop_dnode_OK
(
self
):
def
wait_stop_dnode_OK
(
self
,
newTdSql
):
def
_get_status
():
newTdSql
=
tdCom
.
newTdSql
()
#
newTdSql=tdCom.newTdSql()
status
=
""
newTdSql
.
query
(
"show dnodes"
)
...
...
@@ -242,10 +257,10 @@ class TDTestCase:
break
return
check_status
def
wait_start_dnode_OK
(
self
):
def
wait_start_dnode_OK
(
self
,
newTdSql
):
def
_get_status
():
newTdSql
=
tdCom
.
newTdSql
()
#
newTdSql=tdCom.newTdSql()
status
=
""
newTdSql
.
query
(
"show dnodes"
)
dnode_infos
=
newTdSql
.
queryResult
...
...
@@ -406,6 +421,7 @@ class TDTestCase:
def
stop_follower_when_query_going
(
self
):
tdDnodes
=
cluster
.
dnodes
newTdSql
=
tdCom
.
newTdSql
()
self
.
create_database
(
dbname
=
self
.
db_name
,
replica_num
=
self
.
replica
,
vgroup_nums
=
1
)
self
.
create_stable_insert_datas
(
dbname
=
self
.
db_name
,
stablename
=
"stb1"
,
tb_nums
=
self
.
tb_nums
,
row_nums
=
self
.
row_nums
)
...
...
@@ -419,7 +435,7 @@ class TDTestCase:
# get leader info before stop
before_leader_infos
=
self
.
get_leader_infos
(
self
.
db_name
)
self
.
stop_dnode_id
=
self
.
_get_stop_dnode_id
(
self
.
db_name
)
self
.
stop_dnode_id
=
self
.
_get_stop_dnode_id
(
self
.
db_name
,
"leader"
)
self
.
force_stop_dnode
(
self
.
stop_dnode_id
)
...
...
@@ -437,11 +453,11 @@ class TDTestCase:
time_cost
=
end
-
start
tdLog
.
debug
(
" ==== revote leader of database {} cost time {} ===="
.
format
(
self
.
db_name
,
time_cost
))
self
.
wait_stop_dnode_OK
()
self
.
wait_stop_dnode_OK
(
newTdSql
)
start
=
time
.
time
()
tdDnodes
[
self
.
stop_dnode_id
-
1
].
starttaosd
()
self
.
wait_start_dnode_OK
()
self
.
wait_start_dnode_OK
(
newTdSql
)
end
=
time
.
time
()
time_cost
=
int
(
end
-
start
)
...
...
tests/system-test/clusterCase.sh
浏览文件 @
85552c46
...
...
@@ -19,4 +19,28 @@ python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateStb.py -N 5
# python3 ./test.py -f 6-cluster/5dnode3mnodeRestartDnodeInsertData.py -N 5 -M 3
python3 ./test.py
-f
6-cluster/5dnode3mnodeAdd1Ddnoe.py
-N
6
-M
3
-C
5
# test case of vnode
python3 ./test.py
-f
6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py
-N
4
-M
1
python3 ./test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.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_insertdatas.py
-N
4
-M
1
python3 ./test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py
-N
4
-M
1
python3 ./test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py
-N
4
-M
1
python3 ./test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py
-N
4
-M
1
python3 ./test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py
-N
4
-M
1
python3 ./test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py
-N
4
-M
1
python3 ./test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py -N 4
-M
1
python3 ./test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py -N 4
-M
1
python3 ./test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py
-N
4
-M
1
python3 ./test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py
-N
4
-M
1
python3 ./test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py
-N
4
-M
1
python3 ./test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py
-N
4
-M
1
python3 ./test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py
-N
4
-M
1
python3 ./test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py
-N
4
-M
1
python3 ./test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py
-N
4
-M
1
python3 ./test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py
-N
4
-M
1
python3 ./test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py
-N
4
-M
1
python3 ./test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py
-N
4
-M
1
python3 ./test.py
-f
6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py
-N
4
-M
1
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录