DEV: Remove extra calls to reset_sessions! and use_default_driver (#24977)

Why this change?

Capybara is already calling those two methods: 52eaecea6d/lib/capybara/rspec.rb (L20-L21)
This commit is contained in:
Alan Guo Xiang Tan 2023-12-20 12:27:49 +08:00 committed by GitHub
parent 6d5dd92ea1
commit 4ee381fef3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -585,8 +585,6 @@ RSpec.configure do |config|
page.execute_script("if (typeof MessageBus !== 'undefined') { MessageBus.stop(); }") page.execute_script("if (typeof MessageBus !== 'undefined') { MessageBus.stop(); }")
MessageBus.backend_instance.reset! # Clears all existing backlog from memory backend MessageBus.backend_instance.reset! # Clears all existing backlog from memory backend
Scheduler::Defer.do_all_work # Process everything that was added to the defer queue when running the test Scheduler::Defer.do_all_work # Process everything that was added to the defer queue when running the test
Capybara.reset_sessions!
Capybara.use_default_driver
Discourse.redis.flushdb Discourse.redis.flushdb
end end