Commit bd8b6518 authored by Nick Thomas's avatar Nick Thomas

Merge branch 'bw-fix-key-count-service-spec' into 'master'

small change to make less conflict with EE version

See merge request gitlab-org/gitlab-ce!15809
parents d9f40fdd bcbe5672
...@@ -15,14 +15,12 @@ describe Users::KeysCountService, :use_clean_rails_memory_store_caching do ...@@ -15,14 +15,12 @@ describe Users::KeysCountService, :use_clean_rails_memory_store_caching do
expect(service.count).to eq(1) expect(service.count).to eq(1)
end end
it 'caches the number of keys in Redis' do it 'caches the number of keys in Redis', :request_store do
service.delete_cache
control_count = ActiveRecord::QueryRecorder.new { service.count }.count
service.delete_cache service.delete_cache
recorder = ActiveRecord::QueryRecorder.new do expect { 2.times { service.count } }.not_to exceed_query_limit(control_count)
2.times { service.count }
end
expect(recorder.count).to eq(1)
end end
end end
......
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