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-02 10:52:18 +0300
committerShinya Maeda <shinya@gitlab.com>2018-04-05 08:14:54 +0300
commit3a99a6b9033b669d062e7aa63a680c86240fac6e (patch)
tree3475c1398fb3ce473fb3fc79ddce52cd56e7f8ff /spec/support/chunked_io
parentebf69adc210423dc73c1a87c6a351b56a2772b15 (diff)
Consolidate ChunkedIO
Diffstat (limited to 'spec/support/chunked_io')
-rw-r--r--spec/support/chunked_io/chunked_io_helpers.rb34
1 files changed, 15 insertions, 19 deletions
diff --git a/spec/support/chunked_io/chunked_io_helpers.rb b/spec/support/chunked_io/chunked_io_helpers.rb
index c12ad743c00..35b13bccdb4 100644
--- a/spec/support/chunked_io/chunked_io_helpers.rb
+++ b/spec/support/chunked_io/chunked_io_helpers.rb
@@ -1,6 +1,6 @@
module ChunkedIOHelpers
def fill_trace_to_chunks(data)
- stream = described_class.new(job_id, data.length, 'wb')
+ stream = described_class.new(job_id, nil, 'a+b')
stream.write(data)
stream.close
end
@@ -13,27 +13,23 @@ module ChunkedIOHelpers
end
end
- def sample_trace_size
- sample_trace_raw.length
- end
-
- def sample_trace_raw_for_live_trace
- File.read(expand_fixture_path('trace/sample_trace'))
- end
+ # def sample_trace_raw_for_live_trace
+ # File.read(expand_fixture_path('trace/sample_trace'))
+ # end
- def sample_trace_size_for_live_trace
- sample_trace_raw_for_live_trace.length
- end
+ # def sample_trace_size_for_live_trace
+ # sample_trace_raw_for_live_trace.length
+ # end
- def fill_trace_to_chunks_for_live_trace(data)
- stream = described_class.new(job_id, 'wb')
- stream.write(data)
- stream.close
- end
+ # def fill_trace_to_chunks_for_live_trace(data)
+ # stream = described_class.new(job_id, 'a+b')
+ # stream.write(data)
+ # stream.close
+ # end
- def stub_chunk_store_get_failed
- allow_any_instance_of(chunk_store).to receive(:get).and_return(nil)
- end
+ # def stub_chunk_store_get_failed
+ # allow_any_instance_of(chunk_store).to receive(:get).and_return(nil)
+ # end
def set_smaller_buffer_size_than(file_size)
blocks = (file_size / 128)