mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Revert "FIX: Always clear caches after committing the current transaction" (#22493)
This reverts commit 8310c7842c.
This was breaking precompilation.
This commit is contained in:
committed by
GitHub
parent
9dd01ca2ef
commit
cb794275a7
@@ -151,8 +151,8 @@ end
|
||||
|
||||
TestProf::BeforeAll.configure do |config|
|
||||
config.after(:begin) do
|
||||
DB.test_transaction = ActiveRecord::Base.connection.current_transaction
|
||||
TestSetup.test_setup
|
||||
DB.test_transaction = ActiveRecord::Base.connection.current_transaction
|
||||
end
|
||||
end
|
||||
|
||||
@@ -350,6 +350,8 @@ RSpec.configure do |config|
|
||||
FileUtils.remove_dir(concurrency_safe_tmp_dir, true) if SpecSecureRandom.value
|
||||
end
|
||||
|
||||
config.before :each, &TestSetup.method(:test_setup)
|
||||
|
||||
config.around :each do |example|
|
||||
before_event_count = DiscourseEvent.events.values.sum(&:count)
|
||||
example.run
|
||||
@@ -384,7 +386,6 @@ RSpec.configure do |config|
|
||||
config.before :each do
|
||||
# This allows DB.transaction_open? to work in tests. See lib/mini_sql_multisite_connection.rb
|
||||
DB.test_transaction = ActiveRecord::Base.connection.current_transaction
|
||||
TestSetup.test_setup
|
||||
end
|
||||
|
||||
# Match the request hostname to the value in `database.yml`
|
||||
|
||||
Reference in New Issue
Block a user