Commit ead21845 authored by Stan Hu's avatar Stan Hu

Loosen TTL expectations in tests

https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70444 added some
tests to verify the TTL of sessions, but tests may run slow so the
timing may not be accurate to within a second. We loosen the check to
ensure the value is within 5 seconds.

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/341097
parent 7c942a98
......@@ -13,7 +13,7 @@ module SessionHelpers
session_keys = get_session_keys
expect(session_keys.size).to eq(1)
expect(get_ttl(session_keys.first)).to eq expiration
expect(get_ttl(session_keys.first)).to be_within(5).of(expiration)
end
def get_session_keys
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment