Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test case for append option without compression #3580

Conversation

yaojingguo
Copy link
Contributor

See #3569.

Which issue(s) this PR fixes:
Fixes #

What this PR does / why we need it:

Docs Changes:

Release Note:

See fluent#3569.

Signed-off-by: Jingguo Yao <yaojingguo@gmail.com>
@yaojingguo yaojingguo force-pushed the add-test-case-for-append-option-without-compression branch from b9ea7bb to 7b75866 Compare December 22, 2021 02:31
@ashie
Copy link
Member

ashie commented Dec 27, 2021

As described in #3569 and https://bugs.ruby-lang.org/issues/18388, Ruby 2.7 and 3.0 on macOS have the issue.
Our CI with this test expectedly indicates it.
https://github.com/fluent/fluentd/runs/4602455215?check_suite_focus=true

Failure: test: append without compression(FileOutputTest)
/Users/runner/work/fluentd/fluentd/test/plugin/test_out_file.rb:440:in `check_result'
/Users/runner/work/fluentd/fluentd/test/plugin/test_out_file.rb:415:in `block in check_events_append'
/Users/runner/work/fluentd/fluentd/test/plugin/test_out_file.rb:408:in `upto'
/Users/runner/work/fluentd/fluentd/test/plugin/test_out_file.rb:408:in `check_events_append'
/Users/runner/work/fluentd/fluentd/test/plugin/test_out_file.rb:589:in `block in <class:FileOutputTest>'
     586:   end
     587: 
     588:   test 'append without compression' do
  => 589:     check_events_append(false)
     590:   end
     591: 
     592:   test 'append when JST' do
<"2011-01-02T13:14:15Z\ttest\t{\"a\":1}\n" +
"2011-01-02T13:14:15Z\ttest\t{\"a\":2}\n" +
"2011-01-02T13:14:15Z\ttest\t{\"a\":1}\n" +
"2011-01-02T13:14:15Z\ttest\t{\"a\":2}\n">(UTF-8) expected but was
<"2011-01-02T13:14:15Z\ttest\t{\"a\":1}\n" +
"2011-01-02T13:14:15Z\ttest\t{\"a\":2}\n">(ASCII-8BIT)

diff:
- 2011-01-02T13:14:15Z	test	{"a":1}
- 2011-01-02T13:14:15Z	test	{"a":2}
  2011-01-02T13:14:15Z	test	{"a":1}
  2011-01-02T13:14:15Z	test	{"a":2}
  
? Encoding: UTF  -8   
?           ASCII  BIT
?           ???  +++

Use data driven test instead to make easy to read.

Signed-off-by: Takuro Ashie <ashie@clear-code.com>
@ashie
Copy link
Member

ashie commented Dec 27, 2021

I removed check_events_append method, use data driven test instead to make easy to read.

@ashie
Copy link
Member

ashie commented Dec 27, 2021

The test should be merged with #3579, so I close this one.
Thanks for your contribution!

@ashie ashie closed this Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants