Skip to content

Commit

Permalink
Backport(v1.16) test_cat: specify the reading size to read in binary …
Browse files Browse the repository at this point in the history
…mode (#4730) (#4799)

**Which issue(s) this PR fixes**: 

Backport #4730 

**What this PR does / why we need it**: 

The binary files may not be read properly.
This changes to read files in binary mode.


**Docs Changes**:

**Release Note**:

Signed-off-by: Shizuo Fujita <[email protected]>
Signed-off-by: Kentaro Hayashi <[email protected]>
Co-authored-by: Shizuo Fujita <[email protected]>
  • Loading branch information
kenhys and Watson1978 authored Jan 29, 2025
1 parent ce38a8d commit 9bea070
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/command/test_cat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_cat_secondary_file
d = create_driver
d.run(expect_records: 1) do
Open3.pipeline_w("#{ServerEngine.ruby_bin_path} #{FLUENT_CAT_COMMAND} --port #{@port} --format msgpack secondary") do |stdin|
stdin.write(File.read(path))
stdin.write(File.read(path, File.size(path)))
stdin.close
end
end
Expand Down

0 comments on commit 9bea070

Please sign in to comment.