Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Pubsub snippet fixups#1765

Merged
tseaver merged 4 commits into
googleapis:mastergoogleapis/google-cloud-python:masterfrom
tseaver:1756-pubsub-snippet_fixupCopy head branch name to clipboard
Apr 28, 2016
Merged

Pubsub snippet fixups#1765
tseaver merged 4 commits into
googleapis:mastergoogleapis/google-cloud-python:masterfrom
tseaver:1756-pubsub-snippet_fixupCopy head branch name to clipboard

Conversation

@tseaver

@tseaver tseaver commented Apr 28, 2016

Copy link
Copy Markdown
Contributor

In response to #1756.

Tweaking pubsub snippets to ensure that running them actually passes:

  • Dropping a long-hanging example, never pulled into the Sphinx docs.
  • Adding a time.sleep(1) between the last topic.publish call and the subscription.pull.

Also, fixes a bug exposed by running the snippets: the API object's subscription_pull method was not tolerant of an empty response.

@tseaver tseaver added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. docs testing api: pubsub Issues related to the Pub/Sub API. labels Apr 28, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 28, 2016
@tseaver

tseaver commented Apr 28, 2016

Copy link
Copy Markdown
Contributor Author

@dhermes PTAL

Comment thread docs/pubsub_snippets.py

# [START subscription_pull_none_pending]
pulled = subscription.pull(max_messages=1)
# [END subscription_pull_none_pending]

This comment was marked as spam.

This comment was marked as spam.

@dhermes

dhermes commented Apr 28, 2016

Copy link
Copy Markdown
Contributor

@tseaver This doesn't change any docs, so it's only loosely related to #1756 right?

LGTM anyhow (except for the spelling error).

@tseaver

tseaver commented Apr 28, 2016

Copy link
Copy Markdown
Contributor Author

@dhermes these changes are all things I found while investigating #1756.

@tseaver tseaver merged commit 023f316 into googleapis:master Apr 28, 2016
@tseaver tseaver deleted the 1756-pubsub-snippet_fixup branch April 28, 2016 15:27
@tseaver tseaver mentioned this pull request May 16, 2016
parthea pushed a commit that referenced this pull request Mar 6, 2026
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Mar 9, 2026
feat: Add system test for cross-region buckets
    
- Adds a new system test, test_basic_wrd_x_region, to verify
functionality with cross-region GCS buckets.
    
- Also updates the Cloud Build configuration to pass the necessary
_CROSS_REGION_BUCKET environment variable to the test environment



This PR is a cherry-picked from
googleapis/python-storage#1760 because that PR
is blocked by b/489420625
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 Pub/Sub API. cla: yes This human has signed the Contributor License Agreement. testing type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.