[ 
https://issues.apache.org/jira/browse/YARN-9362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16969560#comment-16969560
 ] 

Denes Gerencser edited comment on YARN-9362 at 11/7/19 9:11 PM:
----------------------------------------------------------------

Hi [~pbacsko],
Thank you for reviewing. Yes, I refactored longer test cases with many asserts 
to more smaller ones.

1) So I left it as is.
2) Good idea, thanks. I changed it to use fixed value (but kept it as local 
variable instead of moving it to a class level _constant_ as it is used only in 
this method). Uploaded as YARN-9362.002.patch.


was (Author: denes.gerencser):
Hi [~pbacsko],
Thank you for reviewing. Yes, I refactored longer test cases with many asserts 
to more smaller ones.

1) So I left it as is.
2) Good idea, thanks. I changed it to use fixed value (but kept it as local 
variable instead of moving it to a class level constant as it is used only in 
this method). Uploaded as YARN-9362.002.patch.

> Code cleanup in TestNMLeveldbStateStoreService
> ----------------------------------------------
>
>                 Key: YARN-9362
>                 URL: https://issues.apache.org/jira/browse/YARN-9362
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Szilard Nemeth
>            Assignee: Denes Gerencser
>            Priority: Minor
>         Attachments: YARN-9362.001.patch, YARN-9362.002.patch
>
>
> There are many ways to improve TestNMLeveldbStateStoreService: 
> 1. RecoveredContainerState fields are asserted many times repeatedly. Some 
> simple method extractions would definitely make this more readable.
> 2. The tests are very long and hard to read in general: Again, finding how 
> methods could be extracted to avoid code repetition could help. 
> 3. You name it.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to