Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
3f17b7a8
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
3f17b7a8
编写于
6月 16, 2023
作者:
W
wade zhang
提交者:
GitHub
6月 16, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #21757 from taosdata/test/main/TS-3524
test:add testcase for TS-3524
上级
cd468c87
d6e14ffb
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
31 addition
and
73 deletion
+31
-73
tests/parallel_test/cases.task
tests/parallel_test/cases.task
+1
-1
tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py
tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py
+30
-72
未找到文件。
tests/parallel_test/cases.task
浏览文件 @
3f17b7a8
...
...
@@ -858,7 +858,7 @@
,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeAdd1Ddnoe.py -N 7 -M 3 -C 6
,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeAdd1Ddnoe.py -N 7 -M 3 -C 6 -n 3
#,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeDrop.py -N 5
,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeRecreateMnode.py -N
5
-M 3
,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeRecreateMnode.py -N
6
-M 3
,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeStopFollowerLeader.py -N 5 -M 3
,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeStop2Follower.py -N 5 -M 3
,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py -N 4 -M 1
...
...
tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py
浏览文件 @
3f17b7a8
...
...
@@ -136,7 +136,7 @@ class TDTestCase:
tdLog
.
info
(
"Confirm the status of the dnode again"
)
tdSql
.
error
(
"create mnode on dnode 2"
)
tdSql
.
query
(
"select * from information_schema.ins_dnodes;"
)
print
(
tdSql
.
queryResult
)
#
print(tdSql.queryResult)
clusterComCheck
.
checkDnodes
(
dnodeNumbers
)
# recreate mnode
...
...
@@ -160,80 +160,38 @@ class TDTestCase:
if
tdSql
.
queryResult
[
i
][
0
]
==
"%s"
%
username
:
tdLog
.
info
(
"create user:%s successfully"
%
username
)
# # create database and stable
# clusterComCreate.create_database(tdSql, paraDict["dbName"],paraDict["dropFlag"], paraDict["vgroups"],paraDict['replica'])
# tdLog.info("Take turns stopping Mnodes ")
# tdDnodes=cluster.dnodes
# stopcount =0
# threads=[]
# # create stable:stb_0
# stableName= paraDict['stbName']
# newTdSql=tdCom.newTdSql()
# clusterComCreate.create_stables(newTdSql, paraDict["dbName"],stableName,paraDict['stbNumbers'])
# #create child table:ctb_0
# for i in range(paraDict['stbNumbers']):
# stableName= '%s_%d'%(paraDict['stbName'],i)
# newTdSql=tdCom.newTdSql()
# clusterComCreate.create_ctable(newTdSql, paraDict["dbName"],stableName,stableName, paraDict['ctbNum'])
# #insert date
# for i in range(paraDict['stbNumbers']):
# stableName= '%s_%d'%(paraDict['stbName'],i)
# newTdSql=tdCom.newTdSql()
# threads.append(threading.Thread(target=clusterComCreate.insert_data, args=(newTdSql, paraDict["dbName"],stableName,paraDict["ctbNum"],paraDict["rowsPerTbl"],paraDict["batchNum"],paraDict["startTs"])))
# for tr in threads:
# tr.start()
# for tr in threads:
# tr.join()
# while stopcount < restartNumbers:
# tdLog.info(" restart loop: %d"%stopcount )
# if stopRole == "mnode":
# for i in range(mnodeNums):
# tdDnodes[i].stoptaosd()
# # sleep(10)
# tdDnodes[i].starttaosd()
# # sleep(10)
# elif stopRole == "vnode":
# for i in range(vnodeNumbers):
# tdDnodes[i+mnodeNums].stoptaosd()
# # sleep(10)
# tdDnodes[i+mnodeNums].starttaosd()
# # sleep(10)
# elif stopRole == "dnode":
# for i in range(dnodeNumbers):
# tdDnodes[i].stoptaosd()
# # sleep(10)
# tdDnodes[i].starttaosd()
# # sleep(10)
# # dnodeNumbers don't include database of schema
# if clusterComCheck.checkDnodes(dnodeNumbers):
# tdLog.info("dnode is ready")
# else:
# print("dnodes is not ready")
# self.stopThread(threads)
# tdLog.exit("one or more of dnodes failed to start ")
# # self.check3mnode()
# stopcount+=1
# clusterComCheck.checkDnodes(dnodeNumbers)
# clusterComCheck.checkDbRows(dbNumbers)
# # clusterComCheck.checkDb(dbNumbers,1,paraDict["dbName"])
# tdSql.execute("use %s" %(paraDict["dbName"]))
# tdSql.query("show stables")
# tdSql.checkRows(paraDict["stbNumbers"])
# # for i in range(paraDict['stbNumbers']):
# # stableName= '%s_%d'%(paraDict['stbName'],i)
# # tdSql.query("select * from %s"%stableName)
# # tdSql.checkRows(rowsPerStb)
""" case for TS-3524 and test 'taos -h' """
bPath
=
self
.
getBuildPath
()
for
i
in
range
(
6
):
nodePort
=
6030
+
i
*
100
newTdSql
=
tdCom
.
newTdSql
(
port
=
nodePort
)
dataPath
=
tdDnodes
[
1
].
dataDir
os
.
system
(
f
"rm -rf
{
dataPath
}
/*"
)
os
.
system
(
f
"rm -rf
{
dataPath
}
/.runing"
)
tdDnodes
[
1
].
stoptaosd
()
tdDnodes
[
1
].
starttaosd
()
sleep
(
5
)
for
i
in
range
(
6
):
nodePort
=
6030
+
i
*
100
newTdSql
=
tdCom
.
newTdSql
(
port
=
nodePort
)
dataPath
=
tdDnodes
[
0
].
dataDir
os
.
system
(
f
"rm -rf
{
dataPath
}
/*"
)
os
.
system
(
f
"rm -rf
{
dataPath
}
/.runing"
)
tdDnodes
[
0
].
stoptaosd
()
tdDnodes
[
0
].
starttaosd
()
sleep
(
5
)
for
i
in
range
(
6
):
nodePort
=
6030
+
i
*
100
newTdSql
=
tdCom
.
newTdSql
(
port
=
nodePort
)
def
run
(
self
):
# print(self.master_dnode.cfgDict)
self
.
fiveDnodeThreeMnode
(
dnodeNumbers
=
5
,
mnodeNums
=
3
,
restartNumbers
=
1
,
stopRole
=
'dnode'
)
self
.
fiveDnodeThreeMnode
(
dnodeNumbers
=
6
,
mnodeNums
=
3
,
restartNumbers
=
1
,
stopRole
=
'dnode'
)
def
stop
(
self
):
tdSql
.
close
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录