2019-07-25 01:27:42 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
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)
|
2018-04-26 02:06:04 -04:00
|
|
|
stub_const('Ci::BuildTraceChunk::CHUNK_SIZE', size)
|
2018-04-05 10:43:21 -04:00
|
|
|
stub_const('Gitlab::Ci::Trace::ChunkedIO::CHUNK_SIZE', size)
|
|
|
|
end
|
|
|
|
end
|