Skip to content

Commit

Permalink
fix network tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rusq committed Nov 24, 2024
1 parent 7a9f5b2 commit e88837c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/network/network_allother_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ package network

import "time"

const maxRunDurationError = 10 * time.Millisecond // maximum deviation of run duration
const maxRunDurationError = 20 * time.Millisecond // maximum deviation of run duration
5 changes: 2 additions & 3 deletions internal/network/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,12 @@ func TestWithRetry(t *testing.T) {
true,
calcRunDuration(10.0, 4),
},
{
"network error (#234)",
{"network error (#234)",
args{
context.Background(),
rate.NewLimiter(10.0, 1),
3,
errSeqFn(&net.OpError{Op: "read"}, 2, nil),
errSeqFn(&net.OpError{Op: "read", Err: errors.New("network error")}, 2, nil),
},
false,
calcExpRunDuration(2),
Expand Down

0 comments on commit e88837c

Please sign in to comment.