Skip to content
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

Error_reporting: 'test_report_exception' systest flakes w/ backoff error #6987

Closed
tseaver opened this issue Dec 18, 2018 · 1 comment · Fixed by #9396
Closed

Error_reporting: 'test_report_exception' systest flakes w/ backoff error #6987

tseaver opened this issue Dec 18, 2018 · 1 comment · Fixed by #9396
Assignees
Labels
api: clouderrorreporting Issues related to the Error Reporting API. flaky testing type: process A process-related concern. May include testing, release, or the like.

Comments

@tseaver
Copy link
Contributor

tseaver commented Dec 18, 2018

See failed system test runs.

___________________ TestErrorReporting.test_report_exception ___________________
self = <test_system.TestErrorReporting testMethod=test_report_exception>
    def test_report_exception(self):
        # Get a class name unique to this test case.
        class_name = "RuntimeError" + unique_resource_id("_")
        # Simulate an error: group won't exist until we report
        # first exception.
        _simulate_exception(class_name, Config.CLIENT)
        is_one = functools.partial(operator.eq, 1)
        is_one.__name__ = "is_one"  # partial() has no name.
        retry = RetryResult(is_one, max_tries=6)
        wrapped_get_count = retry(_get_error_count)
>       error_count = wrapped_get_count(class_name, Config.CLIENT)
tests/system/test_system.py:123:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = ('RuntimeError_1545140110332', <google.cloud.error_reporting.client.Client object at 0x7fb7b6633828>)
kwargs = {}, tries = 6, result = None, delay = 32
msg = 'is_one. Trying again in 32 seconds...'
    @wraps(to_wrap)
    def wrapped_function(*args, **kwargs):
        tries = 0
        while tries < self.max_tries:
            result = to_wrap(*args, **kwargs)
            if self.result_predicate(result):
                return result
            delay = self.delay * self.backoff**tries
            msg = "%s. Trying again in %d seconds..." % (
                self.result_predicate.__name__, delay,)
            self.logger(msg)
            time.sleep(delay)
            tries += 1
>       raise BackoffFailed()
E       test_utils.retry.BackoffFailed
../test_utils/test_utils/retry.py:155: BackoffFailed
@tseaver tseaver added testing api: clouderrorreporting Issues related to the Error Reporting API. type: process A process-related concern. May include testing, release, or the like. flaky labels Dec 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: clouderrorreporting Issues related to the Error Reporting API. flaky testing type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant