Commit 6309f06b authored by Rémy Coutable's avatar Rémy Coutable

Document the new :sidekiq_inline trait

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent a59d10e3
...@@ -357,9 +357,16 @@ However, if a spec makes direct Redis calls, it should mark itself with the ...@@ -357,9 +357,16 @@ However, if a spec makes direct Redis calls, it should mark itself with the
`:clean_gitlab_redis_queues` traits as appropriate. `:clean_gitlab_redis_queues` traits as appropriate.
Sidekiq jobs are typically not run in specs, but this behaviour can be altered Sidekiq jobs are typically not run in specs, but this behaviour can be altered
in each spec through the use of `perform_enqueued_jobs` blocks. Any spec that in each spec through the use of `perform_enqueued_jobs` blocks.
causes Sidekiq jobs to be pushed to Redis should use the `:sidekiq` trait, to Any spec that causes Sidekiq jobs to be pushed to Redis should use the
ensure that they are removed once the spec completes. `:sidekiq_inline` trait, to ensure that they are removed once the spec completes.
The `:sidekiq_might_not_need_inline` trait was added when [Sidekiq inline mode was
changed to fake mode](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31662)
to all the examples that needed Sidekiq to actually process jobs. Examples with
this trait should be either fixed to not rely on Sidekiq processing jobs, or their
`:sidekiq_might_not_need_inline` trait should be updated to `:sidekiq_inline` if the
processing of background jobs is needed/expected.
#### Filesystem #### Filesystem
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment