From 1a43cdb553d40c574646421ba6e8875e44116201 Mon Sep 17 00:00:00 2001 From: xumin Date: Mon, 28 Aug 2023 11:01:14 +0800 Subject: [PATCH] chore(test): time flakiness update time for time sensitve tests --- .../02-integration/06-invalidations/01-cluster_events_spec.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/02-integration/06-invalidations/01-cluster_events_spec.lua b/spec/02-integration/06-invalidations/01-cluster_events_spec.lua index a931160da38a..21751c985fa2 100644 --- a/spec/02-integration/06-invalidations/01-cluster_events_spec.lua +++ b/spec/02-integration/06-invalidations/01-cluster_events_spec.lua @@ -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()