Xushaohong commented on code in PR #4265:
URL: https://github.com/apache/ozone/pull/4265#discussion_r1104015832
##########
hadoop-ozone/dist/src/main/smoketest/omha/testOMHA.robot:
##########
@@ -182,4 +194,38 @@ Restart OM and Verify Ratis Logs
# Verify that the logs match with the Leader OMs logs
List Should Contain Sub List ${logsAfter} ${logsLeader}
+Transfer Leadership for OM
+ # Check OM write operation before failover
+ Create volume and bucket
+ Write Test File
+
+ # Find Leader OM and one Follower OM
+ ${leaderOM} = Get OM Leader Node
+ LOG Leader OM: ${leaderOM}
+ ${followerOM} = Get One OM Follower Node
+ LOG Follower OM: ${followerOM}
+ # Transfer leadership to the Follower OM
+ ${result} = Execute ozone admin om transfer
--service-id=omservice -n ${followerOM}
+ LOG ${result}
+ Should Contain ${result}
Transfer leadership successfully
+
+ ${newLeaderOM} = Get OM Leader Node
+ Should be Equal ${followerOM}
${newLeaderOM}
+ Write Test File
+
+Transfer Leadership for OM randomly
+ # Check OM write operation before failover
+ Create volume and bucket
+ Write Test File
+ # Find Leader OM and one Follower OM
+ ${leaderOM} = Get OM Leader Node
+ LOG Leader OM: ${leaderOM}
+ # Transfer leadership to the Follower OM
+ ${result} = Execute ozone admin om transfer -r
+ LOG ${result}
+ Should Contain ${result}
Transfer leadership successfully
+
+ ${newLeaderOM} = Get OM Leader Node
+ Should Not be Equal ${leaderOM}
${newLeaderOM}
Review Comment:
> Let add a test case with a specific new leader. Just transfer it back to
`${leaderOM}`.
In robot test, there is already a test case to transfer to the specific
leader and also a random cast to transfer randomly.
https://github.com/apache/ozone/blob/c763ee4e8296ca896689813771745758e55aea2e/hadoop-ozone/dist/src/main/smoketest/omha/testOMHA.robot#L197
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]