HDDS-6401. Fix flaky TestFilePerBlockStrategy.testWriteAndReadChunkMultipleTimes#3152
Merged
adoroszlai merged 2 commits intoapache:masterfrom Mar 2, 2022
Merged
Conversation
adoroszlai
requested changes
Mar 2, 2022
Contributor
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @kuenishi for the patch. I have never seen this specific assertion fail in CI. But based on experience with similar time-based tests I can imagine this might fail in some environments.
Removing the assertion is OK. But we can omit the new assertions, as bytes and count are already checked in checkWriteIOStats:
...c/test/java/org/apache/hadoop/ozone/container/keyvalue/impl/CommonChunkManagerTestCases.java
Outdated
Show resolved
Hide resolved
…ozone/container/keyvalue/impl/CommonChunkManagerTestCases.java Co-authored-by: Doroszlai, Attila <6454655+adoroszlai@users.noreply.github.com>
Contributor
Author
|
That makes sense, thank you. I committed your suggestion. |
adoroszlai
approved these changes
Mar 2, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
When ChunkUtils.writeData() finishes too fast, elapsed time for writing data in test case becomes zero because it's resolution is a bit rough, in milliseconds. That leads to the failure of test assertion that checks elapsed time being >0. Here, the check must be on written bytes and ops.
I think this failure does not affect any released version, but current master HEAD is deterministically failing in the unit test due to this issue.
What is the link to the Apache JIRA
HDDS-6401
How was this patch tested?
This is a test code fix