-
Notifications
You must be signed in to change notification settings - Fork 11
test: remove timeouts for pubsub test run #203
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
test: remove timeouts for pubsub test run #203
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #203 +/- ##
=========================================
Coverage 83.18% 83.18%
Complexity 91 91
=========================================
Files 150 150
Lines 8182 8182
Branches 948 948
=========================================
Hits 6806 6806
Misses 926 926
Partials 450 450
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| long timeoutSeconds = isRecording ? 120 : 60; // Increased timeout for integration tests | ||
| long deadline = System.nanoTime() + TimeUnit.SECONDS.toNanos(timeoutSeconds); | ||
|
|
||
| System.out.println("Starting to collect " + toSend.size() + " messages with timeout: " + timeoutSeconds + "s"); |
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.
Let’s remove this System.out.println from the code and use the logger instead.
| Message r = subscription.receive(); | ||
| if (r != null && r.getAckID() != null) { | ||
| ackIDs.add(r.getAckID()); | ||
| System.out.println("Received message " + ackIDs.size() + "/" + toSend.size() + |
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.
Same here
| System.out.println("Received message " + ackIDs.size() + "/" + toSend.size() + | ||
| " with AckID: " + r.getAckID()); | ||
| } else { | ||
| System.out.println("Received null message, waiting..."); |
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.
Same here
89f4306 to
f0f05e7
Compare
f0f05e7 to
89f4306
Compare
Removing explicit timeouts in pubsub tests because they make them flaky. Sometimes the test is almost over but the timeout aborts it resulting in a failure. The test performance has also been improved in this PR by removing conditional and unconditional sleep statements.
Some conventions to follow
docstore:for document store module,blobstorefor Blob Store moduletest:perf: