-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Pub/Sub: fix all publisher examples #2231
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -169,13 +169,15 @@ def test_update(subscriber_client, subscription, capsys): | |
def _publish_messages(publisher_client, topic): | ||
for n in range(5): | ||
data = u'Message {}'.format(n).encode('utf-8') | ||
publisher_client.publish( | ||
future = publisher_client.publish( | ||
topic, data=data) | ||
future.result() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we care about printing the result of this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. |
||
|
||
|
||
def _publish_messages_with_custom_attributes(publisher_client, topic): | ||
data = u'Test message'.encode('utf-8') | ||
publisher_client.publish(topic, data=data, origin='python-sample') | ||
future = publisher_client.publish(topic, data=data, origin='python-sample') | ||
future.result() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above: do we want to print this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No we don't. |
||
|
||
|
||
def _make_sleep_patch(): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this being removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We no longer wait indefinitely. We just wait for the dictionary
futures
to run dry now.