mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
PERF: speed up spec suite, avoid featuring topics
Before: 6:05 After: 5:42 Featuring topics for `list/categories` is a very expensive operation that happened each time we created a topic. This introduces a test only bypass
This commit is contained in:
@ -117,6 +117,9 @@ module TestSetup
|
||||
$test_cleanup_callbacks = nil
|
||||
end
|
||||
|
||||
# in test this is very expensive, we explicitly enable when needed
|
||||
Topic.update_featured_topics = false
|
||||
|
||||
# Running jobs are expensive and most of our tests are not concern with
|
||||
# code that runs inside jobs. run_later! means they are put on the redis
|
||||
# queue and never processed.
|
||||
|
Reference in New Issue
Block a user