2018-04-05 10:43:21 -04:00
|
|
|
module ChunkedIOHelpers
|
|
|
|
def sample_trace_raw
|
|
|
|
@sample_trace_raw ||= File.read(expand_fixture_path('trace/sample_trace'))
|
|
|
|
.force_encoding(Encoding::BINARY)
|
|
|
|
end
|
|
|
|
|
|
|
|
def stub_buffer_size(size)
|
|
|
|
stub_const('Ci::JobTraceChunk::CHUNK_SIZE', size)
|
|
|
|
stub_const('Gitlab::Ci::Trace::ChunkedIO::CHUNK_SIZE', size)
|
|
|
|
end
|
2018-04-06 03:08:23 -04:00
|
|
|
|
|
|
|
def redis_shared_state_outage!
|
|
|
|
Gitlab::Redis::SharedState.with(&:flushall)
|
|
|
|
Sidekiq.redis(&:flushall)
|
|
|
|
end
|
2018-04-05 10:43:21 -04:00
|
|
|
end
|