-
Notifications
You must be signed in to change notification settings - Fork 0
Feature implementation from commits 9409e4f..a35c5d2 #2
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
base: feature-base-branch-2
Are you sure you want to change the base?
Changes from all commits
f9eec85
e2f26e7
d83d461
80f4f99
0523b6a
f00e355
3a60cf7
73e9196
b29171c
f2ac588
d93ea9e
670fbd5
1ce3182
0590709
a35c5d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -107,7 +107,7 @@ func Test_ExponentialBackoff_Next(t *testing.T) { | |||||
for _, tt := range tests { | ||||||
t.Run(tt.name, func(t *testing.T) { | ||||||
t.Parallel() | ||||||
for i := 0; i < tt.expBackoff.MaxRetryCount; i++ { | ||||||
for i := range tt.expBackoff.MaxRetryCount { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🐛 Correctness Issue Compilation Error: Invalid range expression. Using range with an integer (MaxRetryCount) will cause a compilation failure as range in Go requires a slice, array, string, map, or channel to iterate over. Current Code (Diff): - for i := range tt.expBackoff.MaxRetryCount {
+ for i := 0; i < tt.expBackoff.MaxRetryCount; i++ { 📝 Committable suggestion
Suggested change
|
||||||
next := tt.expBackoff.next() | ||||||
if next < tt.expNextTimeIntervals[i] || next > tt.expNextTimeIntervals[i]+1*time.Second { | ||||||
t.Errorf("wrong next time:\n"+ | ||||||
|
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.
🐛 Correctness Issue
Syntax Error: Invalid range expression.
The code uses 'for range e.MaxRetryCount' which is invalid Go syntax as range requires an iterable type (slice, array, map, string, or channel), not an integer.
Current Code (Diff):
📝 Committable suggestion