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

tests.system.test_system.TestLogging: test_log_handler_sync failed #666

Closed
flaky-bot bot opened this issue Nov 7, 2022 · 1 comment
Closed

tests.system.test_system.TestLogging: test_log_handler_sync failed #666

flaky-bot bot opened this issue Nov 7, 2022 · 1 comment
Assignees
Labels
api: logging Issues related to the googleapis/python-logging API. flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@flaky-bot
Copy link

flaky-bot bot commented Nov 7, 2022

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: 77e621c
buildURL: Build Status, Sponge
status: failed

Test output
self = 
def test_log_handler_sync(self):
    LOG_MESSAGE = "It was the best of times."

    handler_name = self._logger_name("handler_sync")
    handler = CloudLoggingHandler(
        Config.CLIENT, name=handler_name, transport=SyncTransport
    )

    # only create the logger to delete, hidden otherwise
    logger = Config.CLIENT.logger(handler.name)
    self.to_delete.append(logger)

    LOGGER_NAME = "mylogger"
    cloud_logger = logging.getLogger(LOGGER_NAME)
    cloud_logger.addHandler(handler)
    cloud_logger.warning(LOG_MESSAGE)
  entries = _list_entries(logger)

tests/system/test_system.py:571:


tests/system/test_system.py:86: in _list_entries
return outer(logger)
.nox/system-3-8/lib/python3.8/site-packages/test_utils/retry.py:100: in wrapped_function
return to_wrap(*args, **kwargs)


args = (<google.cloud.logging_v2.logger.Logger object at 0x7f4f209fa940>,)
kwargs = {}, tries = 6, result = [], delay = 64
msg = '_has_entries. Trying again in 64 seconds...'

@functools.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

.nox/system-3-8/lib/python3.8/site-packages/test_utils/retry.py:170: BackoffFailed

@flaky-bot flaky-bot bot added flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Nov 7, 2022
@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/python-logging API. label Nov 7, 2022
@daniel-sanche
Copy link
Contributor

Closing - looks like this is due to network errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/python-logging API. flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

1 participant