Skip to content

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

Closed

Description

@tseaver

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

Activity

  1. self-assigned this
    on Oct 4, 2019
  2. added a commit that references this issue on Oct 4, 2019
    7924508
  3. added a commit that references this issue on Nov 24, 2025
    2ae4960
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: clouderrorreportingIssues related to the Error Reporting API.flakytestingtype: processA process-related concern. May include testing, release, or the like.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions