Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Commit

Permalink
Fix session test
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaavi committed Dec 22, 2023
1 parent d7ab4d6 commit 540fe8e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions terminal/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@ func TestSuspicionLimit(t *testing.T) {

// Somewhere here we should rate limiting.
for i := 0; i < rateLimitMaxSuspicionPerSecond; i++ {
tErr = s.RateLimit()
s.ReportSuspiciousActivity(SusFactorCommon)
tErr = s.RateLimit()
}
if tErr == nil {
t.Error("should rate limit")
}
assert.ErrorIs(t, tErr, ErrRateLimited, "should rate limit")
}

func TestConcurrencyLimit(t *testing.T) {
Expand Down

0 comments on commit 540fe8e

Please sign in to comment.