You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/04/03 21:26:06 UTC

[GitHub] [hadoop-ozone] cxorm opened a new pull request #770: HDDS-3178. Add unit tests for OMGetDelegationToken Request and Response

cxorm opened a new pull request #770: HDDS-3178. Add unit tests for OMGetDelegationToken Request and Response
URL: https://github.com/apache/hadoop-ozone/pull/770
 
 
   ## What changes were proposed in this pull request?
   
   
   #### Proposed change.
   - Part for testing `OMGetDelegationTokenRequest`
       In `OMGetDelegationTokenRequest#preExecute`, if the `Token<OzoneTokenIdentifier> token` is not `null`, we set `UpdateGetDelegationTokenRequest` with `renewInterval` and we set `GetDelegationTokenResponse` with response. So the UT test these items.
       
       If the `Token<OzoneTokenIdentifier> token` is `null`, we do not set `GetDelegationTokenResponse` with response and UT verified it.
       
       In `OMGetDelegationTokenRequest#validateAndUpdateCache`, if the token is not `null`, we will get `OMClientResponse` with non "-1" renewTime and UT verified it.
       
       The UT also tests `validateAndUpdateCache` with `Token<OzoneTokenIdentifier>` that causes Exception.
    
       
   - Part for testing `OMGetDelegationTokenResponse`
       The UT in this part tests functionality of `addToDBBatch` .
       
   
   - Create base classes `TestOMDelegationTokenResponse` and `TestOMDelegationTokenRequest` for later used by `cancelToken` and `renewToken`.
   
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-3178
   
   ## How was this patch tested?
   Add UTs including 
   - `TestOMGetDelegationTokenRequest`
   - `TestOMGetDelegationTokenResponse`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org