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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
