Skip to content

'Subscription.pull(return_immedately=False, max_messages=2)' returns immediately :( #893

Description

@tseaver

Sporadic regression failure:

======================================================================

ERROR: test_message_pull_mode_e2e (pubsub.TestPubsub)

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/home/travis/build/GoogleCloudPlatform/gcloud-python/regression/pubsub.py", line 123, in test_message_pull_mode_e2e

    received = subscription.pull(max_messages=2)

  File "/home/travis/build/GoogleCloudPlatform/gcloud-python/.tox/regression3/lib/python3.4/site-packages/gcloud/pubsub/subscription.py", line 191, in pull

    for info in response['receivedMessages']]

KeyError: 'receivedMessages'

AFAICT, this is actually a back-end bug -- we are passing the returnImmediately flag through correctly. @tmatsuo can you report it to the pubsub back-end team?

However, we should harden against the missing key in the response, for the case when returnImmediately is True, and there are no messages.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the Pub/Sub API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions