Skip to content
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

fix: make subscriberIT test less flaky #340

Merged
merged 39 commits into from Sep 4, 2020

Conversation

hannahrogers-google
Copy link
Contributor

The subsciberIT test is flaky because of our sync pull examples. We are expecting to receive all 10 published messages, when a pull callable might not return all of the messages (the specified number to pull is the MAX amount that will be returned, not the expected amount). To make this test less flaky, I am changing the test to publish fewer messages.

Fixes #329 ☕️

Adding delivery attempt count to PubsubMessages as a message attribute,
and creating helper function to allow users to get the count without
knowing implementation details.
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 3, 2020
@codecov
Copy link

codecov bot commented Sep 3, 2020

Codecov Report

Merging #340 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #340   +/-   ##
=========================================
  Coverage     79.21%   79.21%           
  Complexity      318      318           
=========================================
  Files            21       21           
  Lines          2892     2892           
  Branches        155      155           
=========================================
  Hits           2291     2291           
  Misses          536      536           
  Partials         65       65           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f379673...b76e387. Read the comment docs.

Copy link
Contributor

@anguillanneuf anguillanneuf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing the flaky test! I often had to run it twice for java8 samples tests to pass. Hope I'll no longer need to do that.

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/java-pubsub API. label Sep 4, 2020
@hannahrogers-google hannahrogers-google merged commit 5d4f534 into googleapis:master Sep 4, 2020
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 googleapis/java-pubsub API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pubsub.SubscriberIT: testSubscriber failed
2 participants