Skip to content

Commit

Permalink
chore(test): time flakiness
Browse files Browse the repository at this point in the history
update time for time sensitve tests
  • Loading branch information
StarlightIbuki committed Aug 28, 2023
1 parent 442b942 commit 1a43cdb
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ for _, strategy in helpers.each_strategy() do

before_each(function()
spy_func = spy.new(function() end)
-- time sensitive tests should have accurate time at the start
-- and for the later `ngx.sleep()` calls the time will be updated automatically
ngx.update_time()
end)

it("broadcasts on a given channel", function()
Expand Down

0 comments on commit 1a43cdb

Please sign in to comment.