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

samples.snippets.subscriber_test: test_receive_with_blocking_shutdown failed #430

Closed
flaky-bot bot opened this issue Jun 17, 2021 · 2 comments · Fixed by #432
Closed

samples.snippets.subscriber_test: test_receive_with_blocking_shutdown failed #430

flaky-bot bot opened this issue Jun 17, 2021 · 2 comments · Fixed by #432
Assignees
Labels
api: pubsub Issues related to the googleapis/python-pubsub API. flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. 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. 🚨 This issue needs some love. samples Issues that are directly related to samples. 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 Jun 17, 2021

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: 7597604
buildURL: Build Status, Sponge
status: failed

Test output
publisher_client = 
topic = 'projects/python-docs-samples-tests/topics/subscription-test-topic-3.8-7faada6fd3a64b79b055298584530098'
subscription_async = 'projects/python-docs-samples-tests/subscriptions/subscription-test-subscription-async-3.8-7faada6fd3a64b79b055298584530098'
capsys = <_pytest.capture.CaptureFixture object at 0x7f142c3a9070>
def test_receive_with_blocking_shutdown(
    publisher_client, topic, subscription_async, capsys
):
    _publish_messages(publisher_client, topic, message_num=3)

    subscriber.receive_messages_with_blocking_shutdown(
        PROJECT_ID, SUBSCRIPTION_ASYNC, timeout=5.0
    )

    out, _ = capsys.readouterr()
    out_lines = out.splitlines()

    msg_received_lines = [
        i for i, line in enumerate(out_lines)
        if re.search(r".*received.*message.*", line, flags=re.IGNORECASE)
    ]
    msg_done_lines = [
        i for i, line in enumerate(out_lines)
        if re.search(r".*done processing.*message.*", line, flags=re.IGNORECASE)
    ]
    stream_canceled_lines = [
        i for i, line in enumerate(out_lines)
        if re.search(r".*streaming pull future canceled.*", line, flags=re.IGNORECASE)
    ]
    shutdown_done_waiting_lines = [
        i for i, line in enumerate(out_lines)
        if re.search(r".*done waiting.*stream shutdown.*", line, flags=re.IGNORECASE)
    ]

    assert "Listening" in out
    assert subscription_async in out

    assert len(stream_canceled_lines) == 1
    assert len(shutdown_done_waiting_lines) == 1
  assert len(msg_received_lines) == 3

E assert 4 == 3
E + where 4 = len([2, 3, 4, 5])

subscriber_test.py:433: AssertionError

@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 Jun 17, 2021
@product-auto-label product-auto-label bot added api: pubsub Issues related to the googleapis/python-pubsub API. samples Issues that are directly related to samples. labels Jun 17, 2021
@flaky-bot
Copy link
Author

flaky-bot bot commented Jun 17, 2021

Looks like this issue is flaky. 😟

I'm going to leave this open and stop commenting.

A human should fix and close this.


When run at the same commit (7597604), this test passed in one build (Build Status, Sponge) and failed in another build (Build Status, Sponge).

@flaky-bot flaky-bot bot added the flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. label Jun 17, 2021
@anguillanneuf
Copy link
Contributor

@plamut I think you authored this sample, could you take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/python-pubsub API. flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. 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. 🚨 This issue needs some love. samples Issues that are directly related to samples. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants