-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-4199. Fix failed UT: TestOMAllocateBlockRequest#testValidateAndUpdateCache #1379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDDS-4199. Fix failed UT: TestOMAllocateBlockRequest#testValidateAndUpdateCache #1379
Conversation
|
Thanks for the investigation! I am not sure if this is a good practice: will it help to insert a wait/sleep/a random operation after |
|
@bharatviswa504 Could you help review this patch ? Thank you very much. |
bharatviswa504
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of completely removing, can we check greater than or equal to?
0ab5567 to
6812034
Compare
|
In fact, greater than or equal to is a good idea! |
...manager/src/test/java/org/apache/hadoop/ozone/om/request/key/TestOMAllocateBlockRequest.java
Show resolved
Hide resolved
|
@bharatviswa504 @amaliujia Thanks for review. I have updated the patch. Besides, I change the order of doPreExecute(createAllocateBlockRequest()) and TestOMRequestUtils.addKeyToTable, to make sure |
|
@bharatviswa504 CI passed. Could you help merge this patch ? Thank you very much. |
adoroszlai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @runzhiwang for the fix.
|
Thanks @runzhiwang for fixing this, @amaliujia and @bharatviswa504 for the review. |
What changes were proposed in this pull request?
What's the problem ?
What's the reason ?
we can not make sure
omKeyInfo.getCreationTime()different fromomKeyInfo.getModificationTime()the creationTime was set in OmKeyInfo at TestOMRequestUtils.addKeyToTable -> OmKeyInfo#createOmKeyInfo
the modificationTime was set in KeyArgs at doPreExecute(createAllocateBlockRequest()) -> OMRequest#preExecute.
And the KeyArgs.modificationTime was set in OmKeyInfo at omAllocateBlockRequest.validateAndUpdateCache -> openKeyInfo.setModificationTime.
Between doPreExecute(createAllocateBlockRequest()) and TestOMRequestUtils.addKeyToTable, there is no time consuming code, so we can not make sure the millisecond time is different.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-4199
How was this patch tested?
no need new test.