Skip to content

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

@tseaver

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

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