Skip to content

Commit

Permalink
Merge branch 'rate_limit/bbr_v1' into rate_limit/bbr_in_limiter
Browse files Browse the repository at this point in the history
  • Loading branch information
CabinfeverB committed Oct 26, 2023
2 parents e11b0e9 + c48e6a5 commit 0e1bc57
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/ratelimit/bbr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func TestBBRMinRt(t *testing.T) {
if i > 0 {
// due to extra time cost in `Sleep`.
re.Less(int64(10000), bbr.getMinRT())
re.Greater(int64(12000), bbr.getMinRT())
re.Greater(int64(12500), bbr.getMinRT())
}
}

Expand All @@ -112,7 +112,7 @@ func TestBBRMinRt(t *testing.T) {
if i > 0 {
// due to extra time cost in `Sleep`.
re.Less(int64(5000), bbr.getMinRT())
re.Greater(int64(6000), bbr.getMinRT())
re.Greater(int64(6500), bbr.getMinRT())
}
}

Expand Down Expand Up @@ -147,7 +147,7 @@ func TestBDP(t *testing.T) {
time.Sleep(bucketDuration)
// due to extra time cost in `Sleep`.
re.LessOrEqual(int64(10), bbr.getMaxInFlight())
re.GreaterOrEqual(int64(12), bbr.getMaxInFlight())
re.GreaterOrEqual(int64(14), bbr.getMaxInFlight())
}

for i := 0; i < 10; i++ {
Expand All @@ -162,7 +162,7 @@ func TestBDP(t *testing.T) {
if i > 0 {
// due to extra time cost in `Sleep`.
re.LessOrEqual(int64(15), bbr.getMaxInFlight())
re.GreaterOrEqual(int64(18), bbr.getMaxInFlight())
re.GreaterOrEqual(int64(22), bbr.getMaxInFlight())
}
}
}
Expand Down

0 comments on commit 0e1bc57

Please sign in to comment.