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

CI: Fails "test: using child processes by round robin[with sections](ExecFilterOutputTest)" test #4754

Closed
Watson1978 opened this issue Jan 5, 2025 · 1 comment · Fixed by #4755
Labels
CI Test/CI issues

Comments

@Watson1978
Copy link
Contributor

Describe the bug

Sometimes, it fails with following error message:

1) Failure: test: using child processes by round robin[with sections](ExecFilterOutputTest)
D:/a/fluentd/fluentd/test/plugin/test_out_exec_filter.rb:514:in `block in <class:ExecFilterOutputTest>'
     511:     assert_equal "2011-01-02 13:14:15\ttest\t3\n", d.formatted[3]
     512: 
     513:     events = d.events
  => 514:     assert_equal 4, events.length
     515: 
     516:     pid_list = []
     517:     events.each do |event|
<4> expected but was
<3>
Error: <4> expected but was
<3>.

To Reproduce

Run CI.

Expected behavior

No error

Your Environment

- Fluentd version:
- Package version:
- Operating system:
- Kernel version:

Your Configuration

none

Your Error Log

See above

Additional context

No response

@Watson1978
Copy link
Contributor Author

It seems that the command is being executed asynchronously with d.run.

d.run(default_tag: 'test', expect_emits: 1, timeout: 10, start: true, shutdown: false){ d.feed(time, {"k1" => 0}) }
d.run(default_tag: 'test', expect_emits: 1, timeout: 10, start: false, shutdown: false){ d.feed(time, {"k1" => 1}) }
d.run(default_tag: 'test', expect_emits: 1, timeout: 10, start: false, shutdown: false){ d.feed(time, {"k1" => 2}) }
d.run(default_tag: 'test', expect_emits: 1, timeout: 10, start: false, shutdown: false){ d.feed(time, {"k1" => 3}) }

When I checked the value of d.emit_count when it failed, it was d.emit_count == 3.

Looks for me that it is better to insert a short waiting time.

daipom pushed a commit that referenced this issue Jan 6, 2025
)

**Which issue(s) this PR fixes**: 
Fixes #4754

**What this PR does / why we need it**: 
This PR will stable the tests.

**Docs Changes**:

**Release Note**:

Signed-off-by: Shizuo Fujita <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Test/CI issues
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant