test(delivery): cover backoff maximum through triggers - #9330
knative-prow[bot] merged 2 commits into
Conversation
52c2011 to
dc4f47a
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9330 +/- ##
==========================================
+ Coverage 51.17% 51.24% +0.06%
==========================================
Files 411 411
Lines 22179 22179
==========================================
+ Hits 11351 11366 +15
+ Misses 9950 9932 -18
- Partials 878 881 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
dc4f47a to
b8419ca
Compare
|
|
||
| for i, wait := range expected { | ||
| actual := deliveries[i+1].Time.Sub(deliveries[i].Time) | ||
| if actual < wait-500*time.Millisecond || actual > wait+3*time.Second { |
There was a problem hiding this comment.
The upper bound +3s seems to benevolent? I'm not a fan of this construction of range assertion.
There was a problem hiding this comment.
Thank you 🙏
After researching, I found that testing/synctest is an effective approach for this issue, so I used it to address the problem.
dsimansk
left a comment
There was a problem hiding this comment.
@kahirokunn looks really good. I've commented on 2 nit, but I'd not call them blocking.
b8419ca to
ec73290
Compare
a73508b to
b582886
Compare
Signed-off-by: kahirokunn <okinakahiro@gmail.com>
Signed-off-by: kahirokunn <okinakahiro@gmail.com>
b582886 to
3873c09
Compare
|
@dsimansk Thank you for the review! I have addressed your feedback. I would appreciate it if you could take another look. Thank you! |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dsimansk, kahirokunn The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Related to #9278.
TL;DR: Extend
backoffMaxcoverage from Subscription-based delivery to Trigger-based delivery so the shared delivery configuration stays aligned across both paths.Proposed Changes
backoffMaxto the internal Subscription.backoffMaxin rekt tests.Pre-review Checklist
Release Note
Docs
Not applicable. This change only adds test coverage and test helpers.