test: adjust case

This commit is contained in:
Shengliang Guan 2022-12-21 11:27:59 +08:00
parent eca8d7ad74
commit 893cf18f8e
1 changed files with 14 additions and 14 deletions

View File

@ -174,34 +174,34 @@ class ClusterComCheck:
tdLog.exit("mnode number is correct") tdLog.exit("mnode number is correct")
if offlineDnodeNo == 1: if offlineDnodeNo == 1:
if tdSql.queryResult[0][2]=='offline' : if tdSql.queryResult[0][2]=='offline' :
if tdSql.queryResult[1][2]=='leader' and tdSql.queryResult[1][3]== 'ready' : if tdSql.queryResult[1][2]=='leader':
if tdSql.queryResult[2][2]=='follower' and tdSql.queryResult[2][3]== 'ready' : if tdSql.queryResult[2][2]=='follower':
tdLog.success("stop mnodes on dnode %d successfully in 10s" %offlineDnodeNo) tdLog.success("stop mnodes on dnode %d successfully in 10s" %offlineDnodeNo)
return True return True
elif tdSql.queryResult[1][2]=='follower' and tdSql.queryResult[1][3]== 'ready' : elif tdSql.queryResult[1][2]=='follower':
if tdSql.queryResult[2][2]=='leader' and tdSql.queryResult[2][3]== 'ready' : if tdSql.queryResult[2][2]=='leader':
tdLog.debug("stop mnodes on dnode %d successfully in 10s" %offlineDnodeNo) tdLog.debug("stop mnodes on dnode %d successfully in 10s" %offlineDnodeNo)
return True return True
count+=1 count+=1
elif offlineDnodeNo == 2: elif offlineDnodeNo == 2:
if tdSql.queryResult[1][2]=='offline' : if tdSql.queryResult[1][2]=='offline' :
if tdSql.queryResult[0][2]=='leader' and tdSql.queryResult[0][3]== 'ready' : if tdSql.queryResult[0][2]=='leader':
if tdSql.queryResult[2][2]=='follower' and tdSql.queryResult[2][3]== 'ready' : if tdSql.queryResult[2][2]=='follower':
tdLog.debug("stop mnodes on dnode %d successfully in 10s" %offlineDnodeNo) tdLog.debug("stop mnodes on dnode %d successfully in 10s" %offlineDnodeNo)
return True return True
elif tdSql.queryResult[0][2]=='follower' and tdSql.queryResult[0][3]== 'ready' : elif tdSql.queryResult[0][2]=='follower':
if tdSql.queryResult[2][2]=='leader' and tdSql.queryResult[2][3]== 'ready' : if tdSql.queryResult[2][2]=='leader':
tdLog.debug("stop mnodes on dnode %d successfully in 10s" %offlineDnodeNo) tdLog.debug("stop mnodes on dnode %d successfully in 10s" %offlineDnodeNo)
return True return True
count+=1 count+=1
elif offlineDnodeNo == 3: elif offlineDnodeNo == 3:
if tdSql.queryResult[2][2]=='offline' : if tdSql.queryResult[2][2]=='offline' :
if tdSql.queryResult[0][2]=='leader' and tdSql.queryResult[0][3]== 'ready' : if tdSql.queryResult[0][2]=='leader':
if tdSql.queryResult[1][2]=='follower' and tdSql.queryResult[1][3]== 'ready' : if tdSql.queryResult[1][2]=='follower':
tdLog.debug("stop mnodes on dnode %d successfully in 10s" %offlineDnodeNo) tdLog.debug("stop mnodes on dnode %d successfully in 10s" %offlineDnodeNo)
return True return True
elif tdSql.queryResult[0][2]=='follower' and tdSql.queryResult[0][3]== 'ready' : elif tdSql.queryResult[0][2]=='follower':
if tdSql.queryResult[1][2]=='leader' and tdSql.queryResult[1][3]== 'ready' : if tdSql.queryResult[1][2]=='leader':
tdLog.debug("stop mnodes on dnode %d successfully in 10s" %offlineDnodeNo) tdLog.debug("stop mnodes on dnode %d successfully in 10s" %offlineDnodeNo)
return True return True
count+=1 count+=1
@ -219,8 +219,8 @@ class ClusterComCheck:
else: else:
tdLog.exit("mnode number is correct") tdLog.exit("mnode number is correct")
if tdSql.queryResult[0][2]=='leader' : if tdSql.queryResult[0][2]=='leader' :
if tdSql.queryResult[1][2]=='offline' and tdSql.queryResult[1][3]== 'ready' : if tdSql.queryResult[1][2]=='offline':
if tdSql.queryResult[2][2]=='offline' and tdSql.queryResult[2][3]== 'ready' : if tdSql.queryResult[2][2]=='offline':
tdLog.success("stop mnodes of follower on dnode successfully in 10s") tdLog.success("stop mnodes of follower on dnode successfully in 10s")
return True return True
count+=1 count+=1