-
Notifications
You must be signed in to change notification settings - Fork 207
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
samples(test): flaky sync pull test #434
Conversation
@@ -475,7 +476,8 @@ def test_receive_synchronously_with_lease( | |||
): | |||
@backoff.on_exception(backoff.expo, Unknown, max_time=300) | |||
def run_sample(): | |||
_publish_messages(publisher_client, topic, message_num=3) | |||
_publish_messages(publisher_client, topic, message_num=10) | |||
time.sleep(10) |
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. 🙂
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.
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!
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.
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: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.