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

test_in_udp: add timeout for message_length_limit test #4676

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

Watson1978
Copy link
Contributor

@Watson1978 Watson1978 commented Oct 20, 2024

Which issue(s) this PR fixes:
Fixes #

What this PR does / why we need it:
On Windows, message_length_limit test always take 300s for execution.

UdpInputTest:
  test:  configure w/o parse section:			.: (0.002351)
  test: configure[ipv4]:				.: (0.002723)
  test: configure[ipv6]:				.: (0.002602)
  test: message size with format[none]:			.: (1.029781)
  test: message size with format[json]:			.: (1.113799)
  test: message size with format[regexp]:		.: (1.110006)
  test: message_length_limit:				.: (300.538596)

The 300 sec comes from

DEFAULT_TIMEOUT = 300
, and it always times out in Windows.

This patch set a short timeout to reduce test execution time on Windows.
Docs Changes:

Release Note:

@Watson1978 Watson1978 requested a review from daipom October 20, 2024 08:48
@Watson1978 Watson1978 force-pushed the test-message_length_limit branch 2 times, most recently from ea28489 to a29b537 Compare October 20, 2024 08:50
@ashie
Copy link
Member

ashie commented Oct 21, 2024

Memo: On windows, data over message_length_limit will be lost completely:
#4117 (comment)

test/plugin/test_in_udp.rb Outdated Show resolved Hide resolved
On Windows, `message_length_limit` test always take 300s for execution.

```
UdpInputTest:
  test:  configure w/o parse section:			.: (0.002351)
  test: configure[ipv4]:				.: (0.002723)
  test: configure[ipv6]:				.: (0.002602)
  test: message size with format[none]:			.: (1.029781)
  test: message size with format[json]:			.: (1.113799)
  test: message size with format[regexp]:		.: (1.110006)
  test: message_length_limit:				.: (300.538596)
```

The 300 sec comes from https://github.com/fluent/fluentd/blob/a2b935ae2bc4b4d43e5adddbec01092ea4228b9e/lib/fluent/test/driver/base.rb#L36,
and it always times out in Windows.

This patch set a short timeout to reduce test execution time on Windows.

Signed-off-by: Watson <fujita@clear-code.com>
@Watson1978 Watson1978 force-pushed the test-message_length_limit branch from a29b537 to 35360b4 Compare October 21, 2024 23:33
Copy link
Contributor

@daipom daipom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@daipom daipom merged commit 38d464a into fluent:master Oct 22, 2024
14 of 16 checks passed
ashie added a commit that referenced this pull request Oct 22, 2024
Although it's improved in #4676, it still takes 5 seconds on windows.
It can be reduced more by sending data that doesn't exceed the limit.

```
  test: message_length_limit:                           .: (1.104855)
```

Signed-off-by: Takuro Ashie <ashie@clear-code.com>
@Watson1978 Watson1978 deleted the test-message_length_limit branch October 28, 2024 06:44
@kenhys kenhys mentioned this pull request Nov 28, 2024
@daipom daipom added the backport to LTS We will backport this fix to the LTS branch label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport to LTS We will backport this fix to the LTS branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants