From ab4158d257bf7a8d079964b9686aed21ac107091 Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Mon, 12 Dec 2022 07:53:39 +0800 Subject: [PATCH] DEV: Flush redis db after each system test (#19415) This ensures that all system tests are starting from a clean state and not leak state between requests. Note that we have to simplify flush the Redis db here because it is not pratical to manually clean up Redis keys in system tests. --- spec/rails_helper.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 21c575c6f99..1602496b367 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -411,6 +411,8 @@ RSpec.configure do |config| end end end + + Discourse.redis.flushdb end config.before(:each, type: :multisite) do