Uh oh!
There was an error while loading. Please reload this page.
HDDS-3178. Add unit tests for OMGetDelegationToken Request and Response - #770
Conversation
adoroszlai
commented
Apr 22, 2020
@hanishakoneru since you created the task for this change, may I ask you to review? |
hanishakoneru
left a comment
There was a problem hiding this comment.
Thank you @cxorm for working on this. Overall LGTM. Just a minor comment.
@bharatviswa504 do you wanna take a quick look as you worked on the DelegationTokenRequests?
There was a problem hiding this comment.
Do we need to set the secretManager again? OzoneManager.getDelegationTokenMgr is going to return the same object again.
There was a problem hiding this comment.
Thank you @hanishakoneru for the review.
Yes, we don't need secretManager here.
Updated.
816fceb to
f7b5341Comparehanishakoneru
commented
Apr 30, 2020
LGTM. +1 pending CI. |
cxorm
commented
Apr 30, 2020
Rebase latest master-branch(#839) and trigger github-actions. |
hanishakoneru
commented
May 5, 2020
Thanks @cxorm for working on this. I will merge this PR. |
cxorm
commented
May 6, 2020
Thanks @hanishakoneru for the merge. |
What changes were proposed in this pull request?
Proposed change.
Part for testing
OMGetDelegationTokenRequestIn
OMGetDelegationTokenRequest#preExecute, if theToken<OzoneTokenIdentifier> tokenis notnull, we setUpdateGetDelegationTokenRequestwithrenewIntervaland we setGetDelegationTokenResponsewith response. So the UT test these items.If the
Token<OzoneTokenIdentifier> tokenisnull, we do not setGetDelegationTokenResponsewith response and UT verified it.In
OMGetDelegationTokenRequest#validateAndUpdateCache, if the token is notnull, we will getOMClientResponsewith non "-1" renewTime and UT verified it.The UT also tests
validateAndUpdateCachewithToken<OzoneTokenIdentifier>that causes Exception.Part for testing
OMGetDelegationTokenResponseThe UT in this part tests functionality of
addToDBBatch.Create base classes
TestOMDelegationTokenResponseandTestOMDelegationTokenRequestfor later used bycancelTokenandrenewToken.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-3178
How was this patch tested?
Add UTs including
TestOMGetDelegationTokenRequestTestOMGetDelegationTokenResponse