Skip to content

Commit

Permalink
tests(plugins/rate-limiting): fix a flaky test (#11705)
Browse files Browse the repository at this point in the history
  • Loading branch information
ADD-SP authored Oct 13, 2023
1 parent 74da3f4 commit 9bf6f85
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/03-plugins/23-rate-limiting/04-access_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,8 @@ if limit_by == "ip" then
assert
.with_timeout(15)
.with_max_tries(10)
.with_step(0.5) -- the windows is 1 second, we wait 0.5 seconds between each retry,
-- that can avoid some unlucky case (we are at the end of the window)
.ignore_exceptions(false)
.eventually(function()
local res1 = GET(test_path, { headers = { ["X-Real-IP"] = "127.0.0.3" }})
Expand Down

1 comment on commit 9bf6f85

@khcp-gha-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel Build

Docker image available kong/kong:9bf6f852c9af167ba941ab5a49ddee626ae68bfa
Artifacts available https://github.com/Kong/kong/actions/runs/6503416304

Please sign in to comment.