mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
DEV: Call Discourse.redis.flushdb after the end of each test (#29117)
There have been too many flaky tests as a result of leaking state in Redis so it is easier to resolve them by ensuring we flush Redis' database. Locally on my machine, calling `Discourse.redis.flushdb` takes around 0.1ms which means this change will have very little impact on test runtimes.
This commit is contained in:

committed by
GitHub

parent
44fe8c62d6
commit
ed6c9d1545
@ -34,10 +34,6 @@ RSpec.xdescribe SiteSettings::DeprecatedSettings do
|
||||
describe "when not overriding deprecated settings" do
|
||||
let(:override) { false }
|
||||
|
||||
# Necessary because Discourse.deprecate uses redis to see if the warning
|
||||
# was already logged.
|
||||
use_redis_snapshotting
|
||||
|
||||
# NOTE: This fixture has some completely made up settings (e.g. min_trust_level_to_allow_invite_tl_and_staff)
|
||||
let(:deprecated_test) { "#{Rails.root}/spec/fixtures/site_settings/deprecated_test.yml" }
|
||||
|
||||
|
Reference in New Issue
Block a user