diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-12-12 20:52:08 +0300 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-12-12 20:52:08 +0300 |
commit | da19ce625ba8a0db9921fd85e331e70b14a5625b (patch) | |
tree | 180dff45ca0d10ee99ea70d452e38d193ecf5bc5 /spec | |
parent | fd0a5168542f3a69815c99dc21f39587064f872d (diff) |
Expire feature flag cache after 1minute
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/metrics/method_call_spec.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/spec/lib/gitlab/metrics/method_call_spec.rb b/spec/lib/gitlab/metrics/method_call_spec.rb index f98d7e48b17..c11da42ed29 100644 --- a/spec/lib/gitlab/metrics/method_call_spec.rb +++ b/spec/lib/gitlab/metrics/method_call_spec.rb @@ -40,15 +40,13 @@ describe Gitlab::Metrics::MethodCall do end it 'expires feature check cache after 30 seconds' do - 10.times do - method_call.measure { 'foo' } - end + method_call.measure { 'foo' } - Timecop.travel(Time.now + 30.seconds) do + Timecop.travel(1.minute.from_now) do method_call.measure { 'foo' } end - Timecop.travel(Time.now + 31.seconds) do + Timecop.travel(1.minute.from_now + 1.second) do method_call.measure { 'foo' } end |