GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — samples(test): flaky sync pull test by anguillanneuf · Pull Request #434 · googleapis/python-pubsub

This repository was archived by the owner on Oct 13, 2026. It is now read-only.

Conversation

@anguillanneuf

@anguillanneuf anguillanneuf commented Jun 23, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fixes #341 🦕

The stream sometimes gets removed (UNKNOWN errors) before the subscriber can successfully pull messages. Pausing to give the subscriber some time to reconnect since this subscription (subscription_sync) is used in two different synchronous pull samples:

  • test_receive_synchronously_with_lease
  • test_receive_synchronously

If this doesn't fix the flaky test, I will consider using two different subscriptions for the two different sync pull samples tests.

The delete schema sample test failure is unrelated. It's known and is flaky due to backend issues.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@anguillanneuf
samples(test): flaky sync pull test
16c25c1
@anguillanneuf
anguillanneuf requested a review from a team as a code owner June 23, 2021 15:53
@anguillanneuf
anguillanneuf requested review from dandhlee and removed request for a team June 23, 2021 15:53
@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 23, 2021
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 23, 2021
plamut
plamut reviewed Jun 23, 2021
View reviewed changes
Comment thread samples/snippets/subscriber_test.py
def run_sample():
_publish_messages(publisher_client, topic, message_num=3)
_publish_messages(publisher_client, topic, message_num=10)
time.sleep(10)

@plamut plamut Jun 23, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

Maybe add a comment why this is needed?

Waiting for a fixed amount of time is of course far from ideal, but if it resolves or at least significantly mitigates the flakiness, it's fine to have it, as flakiness has really been getting into the way recently.

Edit: Whoa, samples tests passed on the first attempt. Could be a coincidence, of course, but it's a good start nevertheless. 🙂

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@anguillanneuf anguillanneuf Jun 23, 2021

Copy link
Copy Markdown
Contributor Author

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.

Added a comment. Please take a look now to see if it's sufficient.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@plamut plamut Jun 23, 2021

Copy link
Copy Markdown
Contributor

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.

Looks good, thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@anguillanneuf
address peter's comment
3229a80
@anguillanneuf
anguillanneuf requested a review from plamut June 23, 2021 16:33
plamut
plamut approved these changes Jun 23, 2021
View reviewed changes

@plamut plamut left a comment

Copy link
Copy Markdown
Contributor

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.

LGTM and the samples tests seem to be passing without retries.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@plamut
plamut merged commit 86f1f68 into master Jun 23, 2021
@plamut
plamut deleted the samples-sync-pull branch June 23, 2021 16:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@dandhlee dandhlee Awaiting requested review from dandhlee
1 more reviewer
@plamut plamut plamut approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: pubsub Issues related to the googleapis/python-pubsub API. cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

samples.snippets.subscriber_test: test_receive_synchronously_with_lease failed

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@anguillanneuf @plamut
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.