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 (mostrecentcalllast):
File"/home/travis/build/GoogleCloudPlatform/gcloud-python/regression/pubsub.py", line123, intest_message_pull_mode_e2ereceived=subscription.pull(max_messages=2)
File"/home/travis/build/GoogleCloudPlatform/gcloud-python/.tox/regression3/lib/python3.4/site-packages/gcloud/pubsub/subscription.py", line191, inpullforinfoinresponse['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.

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