-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Retry entire test_paginate_files() storage system test. #2293
Conversation
This is not just "taking the easy way out", it's really the most appropriate fix since there are so many assertions that can fail due to eventual consistency. (For example, asking for 2 blobs should have a next page when 3 are in the bucket, but this may break down due to eventual consistency.) Fixes googleapis#2217. Also - restoring test_second_level() to pre-googleapis#2252 (by retrying the entire test case) - restoring test_list_files() to pre-googleapis#2181 (by retrying the entire test case) - adding retries around remaining test cases that call list_blobs(): test_root_level_w_delimiter(), test_first_level() and test_third_level() - adding a helper to empty a bucket in setUpClass() helper (which also uses list_blobs()) in both TestStoragePseudoHierarchy and TestStorageListFiles
@dhermes, one thing I thought about the issue you mentioned with I also think you could stack |
@daspecster Thanks for the tip, though I was aware of that behavior already. The point of this is that the failures are quite complex and to really change them to be eventual-consistency-proof would be equivalent to decorating the entire method, so we might as well. |
I'm doubtful that wrapping the entire testcase is going to make us more robust than wrapping the individual |
@tseaver None of the wrapped tests call |
@tseaver Bump. This showed up again in: https://travis-ci.org/GoogleCloudPlatform/google-cloud-python/builds/160041019 |
Hmm? The all call I'm still dubious that we should assume any assertion failure in one of these tests is due to an eventual consistency error. |
@tseaver Regarding your doubt:
|
I'll acquiesce, but still think we'd be better off repeating the |
This is not just "taking the easy way out", it's really the most appropriate fix since there are so many
assertions that can fail due to eventual consistency. (For example, asking for 2 blobs should have a next page when 3 are in the bucket, but this may break down due to eventual consistency.)
Fixes #2217.
Also
test_second_level()
to pre-Adding a retry for storage list_blobs(). #2252 (by retrying the entire test case)test_list_files()
to pre-Add eventual consistency check for storage list_blobs() #2181 (by retrying the entire test case)list_blobs()
:test_root_level_w_delimiter()
,test_first_level()
andtest_third_level()
setUpClass()
helper (which also useslist_blobs()
) in bothTestStoragePseudoHierarchy
andTestStorageListFiles
@tseaver I would like some input here. I am worried that
RetryErrors
on the errorunittest.TestCase.failureException
is insufficient / overly general. This is especially becauseunittest.TestCase.failureException
is just an alias forAssertionError
.Should we temporarily replace it (via another decorator)?