Commit 1141506d authored by Nick Thomas's avatar Nick Thomas

Merge branch 'make-redis-instrumentation-spec-more-robust' into 'master'

Make Redis instrumentation spec more robust

See merge request gitlab-org/gitlab!70510
parents 065adff9 61e2369d
......@@ -28,6 +28,13 @@ RSpec.describe Gitlab::Instrumentation::Redis do
describe '.payload', :request_store do
before do
# If this is the first spec in a spec run that uses Redis, there
# will be an extra SELECT command to choose the right database. We
# don't want to make the spec less precise, so we force that to
# happen (if needed) first, then clear the counts.
Gitlab::Redis::Cache.with { |redis| redis.info }
RequestStore.clear!
Gitlab::Redis::Cache.with { |redis| redis.set('cache-test', 321) }
Gitlab::Redis::SharedState.with { |redis| redis.set('shared-state-test', 123) }
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