This repository was archived by the owner on Mar 9, 2026. It is now read-only.
samples: fix flaky tests#233
Merged
Merged
Conversation
feat: Enable server side flow control by default with the option to turn it off (#231) * Enable server side flow control by default with the option to turn it off This change enables sending flow control settings automatically to the server. If flow_control.max_messages > 0 or flow_control.max_bytes > 0, flow control will be enforced at the server side (in addition to the client side). This behavior is enabled by default and users who would like to opt-out of this feature --in case they encouter issues with server side flow control-- can pass in use_legacy_flow_control=True in SubscriberClient.subscribe(). * Enable server side flow control by default with the option to turn it off This change enables sending flow control settings automatically to the server. If flow_control.max_messages > 0 or flow_control.max_bytes > 0, flow control will be enforced at the server side (in addition to the client side). This behavior is enabled by default and users who would like to opt-out of this feature --in case they encouter issues with server side flow control-- can pass in use_legacy_flow_control=true in subscriberclient.subscribe(). Co-authored-by: Tianzi Cai <tianzi@google.com> fix: replace AssertionError with NotFound fix: add another pytest fixture in failing test remove backoff
3582da5 to
a5b1182
Compare
|
I know this is a draft but I'm just commenting because I'm mildly concerned about the title - tests should be order independent. If something needs to exist in order for a test to run, please use pytest fixtures to do so. Or, if it's something really long running (i.e. automl trained model) we may need to explore having a static resource. And if you already knew all of this, feel free to ignore me. and if you want to talk more ping me :) |
leahecole
approved these changes
Dec 10, 2020
leahecole
left a comment
There was a problem hiding this comment.
Super minor nits, bu otherwise lgtm
pradn
suggested changes
Dec 10, 2020
3b30baa to
e879578
Compare
pradn
approved these changes
Dec 11, 2020
Contributor
Author
|
Fixes #240 |
Contributor
Author
|
Fixes #246 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The two tests at the end of
subscriber_tests.pyoften cause tests to fail due to subscriptionNotFounderror.The order of the tests shouldn't matter, what really fixes the tests is the python version in resource names. I suspect the different runtimes were pulling messages from the same topic (created using UUID) and destroying the topic and subscription resources before the other runtimes could finish. Or the service takes too long to make topics and subscriptions (sometimes up to two minutes).
Fixes #227
Fixes #240
Fixes #246