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:
Sam Saffron
2019-05-10 11:37:37 +10:00
parent 41f4f9302d
commit 0ab6c6e24e
3 changed files with 28 additions and 13 deletions

View File

@ -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.