Skip to content

Commit

Permalink
fix cubicwait test
Browse files Browse the repository at this point in the history
  • Loading branch information
rusq committed Apr 7, 2024
1 parent 3cb1506 commit 3b5dd14
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ dist/
/tmp
*.dot
*.gz

*.html
11 changes: 6 additions & 5 deletions internal/network/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,12 @@ func Test_cubicWait(t *testing.T) {
args args
want time.Duration
}{
{"attempt 0", args{0}, 8 * time.Second},
{"attempt 1", args{1}, 27 * time.Second},
{"attempt 2", args{2}, 64 * time.Second},
{"attempt 2", args{4}, 216 * time.Second},
{"attempt 100", args{5}, maxAllowedWaitTime}, // check if capped properly
{"attempt 0", args{0}, 1 * time.Second},
{"attempt 1", args{1}, 8 * time.Second},
{"attempt 2", args{2}, 27 * time.Second},
{"attempt 4", args{4}, 125 * time.Second},
{"attempt 5", args{5}, 216 * time.Second},
{"attempt 6", args{6}, maxAllowedWaitTime}, // check if capped properly
{"attempt 100", args{1000}, maxAllowedWaitTime},
}
for _, tt := range tests {
Expand Down

0 comments on commit 3b5dd14

Please sign in to comment.