We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fec56cb commit a4bfdffCopy full SHA for a4bfdff
internal/backoff/backoff_test.go
@@ -101,6 +101,27 @@ func TestLogBackoff(t *testing.T) {
101
{eq: 8 * time.Second}, // 1 << min(6, 3)
102
},
103
104
+ {
105
+ backoff: New(
106
+ WithSlotDuration(time.Second),
107
+ WithCeiling(6),
108
+ WithJitterLimit(1),
109
+ ),
110
+ exp: []exp{
111
+ {eq: time.Second}, // 1 << min(0, 3)
112
+ {eq: 2 * time.Second}, // 1 << min(1, 3)
113
+ {eq: 4 * time.Second}, // 1 << min(2, 3)
114
+ {eq: 8 * time.Second}, // 1 << min(3, 3)
115
+ {eq: 16 * time.Second}, // 1 << min(4, 3)
116
+ {eq: 32 * time.Second}, // 1 << min(5, 3)
117
+ {eq: 64 * time.Second}, // 1 << min(6, 3)
118
119
120
121
122
123
+ },
124
125
} {
126
t.Run(test.name, func(t *testing.T) {
127
if test.seeds == 0 {
0 commit comments