-
Notifications
You must be signed in to change notification settings - Fork 556
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
Wait for object to upload properly #4945
Conversation
Sometimes while mint tests, removal of object immediately after upload command fails with object not found. As the object may not be uploaded and reflected yet to the cluster, this can fail. Added a small sleep after upload to make sure object is available before any remove call. Signed-off-by: Shubhendu Ram Tripathi <[email protected]>
@@ -1028,6 +1028,7 @@ function test_bucket_replication() { | |||
break | |||
fi | |||
assert_success "$start_time" "${FUNCNAME[0]}" mc_cmd cp "$FILE_0_B" "${SERVER_ALIAS}/${bkt1}/${object_name}" | |||
sleep 5s # to make sure objects reflects |
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.
Looks more like you are trying to hide an underlying issue.
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.
in local testing and even with play it always worked. only during CI while mint tests sometimes it fails.
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.
@shtripat A wait is never the solution. It may make it less likely - but AFAICT this shouldn't be needed in the first place, unless we are not consistent.
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.
I agree, but not sure as some cases it just fails immediate rm for the object which was uploaded using mc cp
.
This test anyway was added for a scenario which in itself is very rare. May be we can just disable this test for the time being.
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.
We should figure out why it is failing in the first place.
As discussed removing this from |
Community Contribution License
All community contributions in this pull request are licensed to the project maintainers
under the terms of the Apache 2 license.
By creating this pull request I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 license.
Description
Sometimes while mint tests, removal of object immediately after upload command fails with object not found. As the object may not be uploaded and reflected yet to the cluster, this can fail. Added a small sleep after upload to make sure object is available before any remove call.
Motivation and Context
How to test this PR?
mint tests would take care
Types of changes
Checklist:
commit-id
orPR #
here)