diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-04-06 10:08:23 +0300 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-04-06 10:08:23 +0300 |
commit | aaff5e452ecfdcab3b76873da37b864109703b18 (patch) | |
tree | 57ed49928d498e3fa774f9d44c87ed7167540ad6 /spec/support/chunked_io | |
parent | eaf29ccec0b8075d87f8444839c383d8ef66dfd7 (diff) |
Add spec that proves trace can be recovered even if it had redis outage
Diffstat (limited to 'spec/support/chunked_io')
-rw-r--r-- | spec/support/chunked_io/chunked_io_helpers.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/support/chunked_io/chunked_io_helpers.rb b/spec/support/chunked_io/chunked_io_helpers.rb index a95eb87d7b8..57391e6d42a 100644 --- a/spec/support/chunked_io/chunked_io_helpers.rb +++ b/spec/support/chunked_io/chunked_io_helpers.rb @@ -8,4 +8,9 @@ module ChunkedIOHelpers stub_const('Ci::JobTraceChunk::CHUNK_SIZE', size) stub_const('Gitlab::Ci::Trace::ChunkedIO::CHUNK_SIZE', size) end + + def redis_shared_state_outage! + Gitlab::Redis::SharedState.with(&:flushall) + Sidekiq.redis(&:flushall) + end end |