-
Notifications
You must be signed in to change notification settings - Fork 72
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: stabilized HBAR Rate Limit acceptance tests #3189
Conversation
3ce1052
to
be75fdd
Compare
Test Results 4 files - 18 419 suites +151 19s ⏱️ - 35m 30s Results for commit c8076f8. ± Comparison against base commit f189801. This pull request removes 578 and adds 1474 tests. Note that renamed tests count towards both.
This pull request removes 4 skipped tests and adds 1 skipped test. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
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.
Some comments.
I understand the unblocking driver but let's capture all these needed waits and come back in the future to remove them as this likely just pushes the issue down the road
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
1269b74
to
2bf2bf2
Compare
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.
One question.
Signed-off-by: Logan Nguyen <[email protected]>
Quality Gate passedIssues Measures |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3189 +/- ##
=======================================
Coverage 83.35% 83.35%
=======================================
Files 66 66
Lines 4290 4290
Branches 837 837
=======================================
Hits 3576 3576
Misses 473 473
Partials 241 241
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Description:
With the new implementation of
HbarLimitService
enabled, the HBAR Limiter test has become highly flaky. Since adding expenses and updating spending plans are executed asynchronously, and the suite includes exhaustion tests with numerous consecutive calls to the network, the test client sometimes fails to retrieve the correct amounts.The tests are flaky to the extent that they either fail or only pass after multiple retries. To address this, this PR includes measures to stabilize the tests by:
- Adding polling methods to verify the remaining HBARs and amounts spent by
hbarSpendingPlans
.- Increasing tolerance in
verifyRemainingLimit()
.- Adding a 1500ms wait time after each test case to allow asynchronous expense updates to complete in the background.
- Introducing a
TEST_TRANSACTION_RECORD_COST_TOLERANCE
configuration variable for tolerance, allowing for reuse throughout the test and facilitating easy adjustments without requiring code changes.Related issue(s):
Fixes #3188
Notes for reviewer:
Checklist