Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-04-06 10:08:23 +0300
committerShinya Maeda <shinya@gitlab.com>2018-04-06 10:08:23 +0300
commitaaff5e452ecfdcab3b76873da37b864109703b18 (patch)
tree57ed49928d498e3fa774f9d44c87ed7167540ad6 /spec/support/chunked_io
parenteaf29ccec0b8075d87f8444839c383d8ef66dfd7 (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.rb5
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