Skip to content

Commit

Permalink
✅ Eliminate flakiness in new auto test
Browse files Browse the repository at this point in the history
Allow elapsed time to be equal to wait time instead of strictly greater than.
  • Loading branch information
randycoulman committed Sep 15, 2023
1 parent fd584fe commit 9e5c418
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/config_cat/cache_policy/auto_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ defmodule ConfigCat.CachePolicy.AutoTest do
assert {:ok, old_settings, old_entry.fetch_time_ms} == CachePolicy.get(instance_id)
elapsed_ms = FetchTime.now_ms() - before

assert wait_time_ms < elapsed_ms && elapsed_ms < wait_time_ms * 2
assert wait_time_ms <= elapsed_ms && elapsed_ms <= wait_time_ms * 2
end

test "doesn't refresh between poll intervals", %{entry: entry} do
Expand Down

0 comments on commit 9e5c418

Please sign in to comment.