Skip to content

Commit eb3d8dc

Browse files
committed
fix test for slow windows + add newer golang versions
1 parent 01d7e00 commit eb3d8dc

File tree

4 files changed

+74
-2
lines changed

4 files changed

+74
-2
lines changed

.github/workflows/workflow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
go-version: ['1.18', '1.19', '1.20']
26+
go-version: ['1.18', '1.19', '1.20', 1.21', '1.22', '1.23', '1.24']
2727
os: [ubuntu-latest, macos-latest, windows-latest]
2828
env:
2929
OS: ${{ matrix.os }}

current.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
goos: darwin
2+
goarch: amd64
3+
pkg: github.com/avast/retry-go/v4
4+
cpu: Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
5+
BenchmarkDo-16 3 474128987 ns/op 2730 B/op 48 allocs/op
6+
BenchmarkDo-16 3 441499631 ns/op 2725 B/op 47 allocs/op
7+
BenchmarkDo-16 3 449390845 ns/op 2693 B/op 47 allocs/op
8+
BenchmarkDo-16 3 488695333 ns/op 2725 B/op 47 allocs/op
9+
BenchmarkDo-16 2 601685067 ns/op 2704 B/op 48 allocs/op
10+
BenchmarkDo-16 3 336872997 ns/op 2693 B/op 47 allocs/op
11+
BenchmarkDo-16 3 384347911 ns/op 2725 B/op 47 allocs/op
12+
BenchmarkDo-16 3 480906307 ns/op 2693 B/op 47 allocs/op
13+
BenchmarkDo-16 3 455362447 ns/op 2693 B/op 47 allocs/op
14+
BenchmarkDo-16 3 443170384 ns/op 2693 B/op 47 allocs/op
15+
BenchmarkDoNoErrors-16 6872852 159.4 ns/op 208 B/op 4 allocs/op
16+
BenchmarkDoNoErrors-16 7650360 161.3 ns/op 208 B/op 4 allocs/op
17+
BenchmarkDoNoErrors-16 7235683 159.3 ns/op 208 B/op 4 allocs/op
18+
BenchmarkDoNoErrors-16 7465636 160.2 ns/op 208 B/op 4 allocs/op
19+
BenchmarkDoNoErrors-16 7549692 160.7 ns/op 208 B/op 4 allocs/op
20+
BenchmarkDoNoErrors-16 7510610 159.8 ns/op 208 B/op 4 allocs/op
21+
BenchmarkDoNoErrors-16 7438124 160.3 ns/op 208 B/op 4 allocs/op
22+
BenchmarkDoNoErrors-16 7416504 160.2 ns/op 208 B/op 4 allocs/op
23+
BenchmarkDoNoErrors-16 7356183 160.4 ns/op 208 B/op 4 allocs/op
24+
BenchmarkDoNoErrors-16 7393480 160.1 ns/op 208 B/op 4 allocs/op
25+
PASS
26+
ok github.com/avast/retry-go/v4 35.971s

generic.txt

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
goos: darwin
2+
goarch: amd64
3+
pkg: github.com/avast/retry-go/v4
4+
cpu: Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
5+
BenchmarkDo-16 3 406306609 ns/op 2701 B/op 48 allocs/op
6+
BenchmarkDo-16 3 419470846 ns/op 2693 B/op 47 allocs/op
7+
BenchmarkDo-16 2 567716303 ns/op 2696 B/op 47 allocs/op
8+
BenchmarkDo-16 2 562713288 ns/op 2696 B/op 47 allocs/op
9+
BenchmarkDo-16 3 418301987 ns/op 2693 B/op 47 allocs/op
10+
BenchmarkDo-16 2 541207332 ns/op 2696 B/op 47 allocs/op
11+
BenchmarkDo-16 2 526211617 ns/op 2696 B/op 47 allocs/op
12+
BenchmarkDo-16 2 517419526 ns/op 2696 B/op 47 allocs/op
13+
BenchmarkDo-16 3 478391497 ns/op 2693 B/op 47 allocs/op
14+
BenchmarkDo-16 3 452548175 ns/op 2725 B/op 47 allocs/op
15+
BenchmarkDoWithData-16 3 463040866 ns/op 2693 B/op 47 allocs/op
16+
BenchmarkDoWithData-16 3 496158943 ns/op 2693 B/op 47 allocs/op
17+
BenchmarkDoWithData-16 3 488367012 ns/op 2725 B/op 47 allocs/op
18+
BenchmarkDoWithData-16 3 454618897 ns/op 2693 B/op 47 allocs/op
19+
BenchmarkDoWithData-16 3 435430056 ns/op 2693 B/op 47 allocs/op
20+
BenchmarkDoWithData-16 2 552289967 ns/op 2744 B/op 48 allocs/op
21+
BenchmarkDoWithData-16 3 569748815 ns/op 2693 B/op 47 allocs/op
22+
BenchmarkDoWithData-16 3 416597207 ns/op 2725 B/op 47 allocs/op
23+
BenchmarkDoWithData-16 3 358455415 ns/op 2725 B/op 47 allocs/op
24+
BenchmarkDoWithData-16 3 455297803 ns/op 2725 B/op 47 allocs/op
25+
BenchmarkDoNoErrors-16 7035135 161.9 ns/op 208 B/op 4 allocs/op
26+
BenchmarkDoNoErrors-16 7389806 161.3 ns/op 208 B/op 4 allocs/op
27+
BenchmarkDoNoErrors-16 7394016 161.5 ns/op 208 B/op 4 allocs/op
28+
BenchmarkDoNoErrors-16 7380039 162.2 ns/op 208 B/op 4 allocs/op
29+
BenchmarkDoNoErrors-16 7424865 162.2 ns/op 208 B/op 4 allocs/op
30+
BenchmarkDoNoErrors-16 7111860 160.5 ns/op 208 B/op 4 allocs/op
31+
BenchmarkDoNoErrors-16 7285305 162.6 ns/op 208 B/op 4 allocs/op
32+
BenchmarkDoNoErrors-16 7410627 160.7 ns/op 208 B/op 4 allocs/op
33+
BenchmarkDoNoErrors-16 7340961 161.6 ns/op 208 B/op 4 allocs/op
34+
BenchmarkDoNoErrors-16 7295727 164.1 ns/op 208 B/op 4 allocs/op
35+
BenchmarkDoWithDataNoErrors-16 7357304 159.9 ns/op 208 B/op 4 allocs/op
36+
BenchmarkDoWithDataNoErrors-16 6649852 166.9 ns/op 208 B/op 4 allocs/op
37+
BenchmarkDoWithDataNoErrors-16 6938404 176.3 ns/op 208 B/op 4 allocs/op
38+
BenchmarkDoWithDataNoErrors-16 7181965 160.4 ns/op 208 B/op 4 allocs/op
39+
BenchmarkDoWithDataNoErrors-16 7311484 166.2 ns/op 208 B/op 4 allocs/op
40+
BenchmarkDoWithDataNoErrors-16 6939157 169.7 ns/op 208 B/op 4 allocs/op
41+
BenchmarkDoWithDataNoErrors-16 6648344 179.0 ns/op 208 B/op 4 allocs/op
42+
BenchmarkDoWithDataNoErrors-16 6794847 177.0 ns/op 208 B/op 4 allocs/op
43+
BenchmarkDoWithDataNoErrors-16 6782588 171.4 ns/op 208 B/op 4 allocs/op
44+
BenchmarkDoWithDataNoErrors-16 7279119 166.9 ns/op 208 B/op 4 allocs/op
45+
PASS
46+
ok github.com/avast/retry-go/v4 73.128s

retry_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ func TestMaxDelay(t *testing.T) {
278278
dur := time.Since(start)
279279
assert.Error(t, err)
280280
assert.Greater(t, dur, 120*time.Millisecond, "5 times with maximum delay retry is less than 120ms")
281-
assert.Less(t, dur, 250*time.Millisecond, "5 times with maximum delay retry is longer than 250ms")
281+
assert.Less(t, dur, 275*time.Millisecond, "5 times with maximum delay retry is longer than 275ms")
282282
}
283283

284284
func TestBackOffDelay(t *testing.T) {

0 commit comments

Comments
 (0)