LZD-PratyushBhatt commented on code in PR #5439:
URL: https://github.com/apache/ozone/pull/5439#discussion_r1361225144
##########
hadoop-ozone/dist/src/main/smoketest/omha/om-leader-transfer.robot:
##########
@@ -44,30 +44,135 @@ Get One OM Follower Node
LOG Follower OM: ${followerOM}
[return] ${followerOM}
+Get OM Leader and One Follower Node
+ ${follower_node} = Get One OM Follower Node
+ ${leader_node} = Get OM Leader Node
+ [Return] ${leader_node} ${follower_node}
-** Test Cases ***
-Transfer Leadership for OM
+*** Test Cases ***
+Transfer Leadership for OM with Valid ServiceID Specified
# 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}
+ ${leaderOM} ${followerOM} = Get OM Leader and One Follower Node
+
# 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}
+ Should not be Equal ${leaderOM}
${newLeaderOM}
-Transfer Leadership for OM randomly
+Transfer Leadership for OM with Multiple ServiceIDs, Valid ServiceID Specified
+ # Find Leader OM and one Follower OM
+ ${leaderOM} ${followerOM} = Get OM Leader and One Follower Node
+
+ # Transfer leadership to the Follower OM
+ ${result} = Execute ozone admin
--set=ozone.om.service.ids=omservice,omservice2 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}
+ Should not be Equal ${leaderOM}
${newLeaderOM}
+
+Transfer Leadership for OM with Multiple ServiceIDs, Unconfigured ServiceID
Specified
+ # Find one Follower OM
+ ${followerOM} = Get One OM Follower Node
+ LOG Follower
OM: ${followerOM}
+
+ # Transfer leadership to the Follower OM
+ ${result} = Execute And Ignore Error ozone
admin --set=ozone.om.service.ids=omservice,omservice2 om transfer
--service-id=omservice3 -n ${followerOM}
+ LOG ${result}
Review Comment:
Fixed
--
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]