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

[UNDERTOW-2027] Spurious buffer leak error in the test-suite (HttpClientTestCase.testReadTimeout) #1299

Merged
merged 1 commit into from Mar 11, 2022

Conversation

rmartinc
Copy link
Contributor

Issue: https://issues.redhat.com/browse/UNDERTOW-2027

AFAICT there is no real leak in HttpClientTestCase.testReadTimeout. The problem is with the TS. Two problems fixed in this PR related to that test:

  1. Re-adding the read timeout when doing a resumeReads if not previously set. Added a new test testReadTimeoutAtInit which forces the timeout before writing anything back to the client.
  2. Fixing how the buffer leaks are detected in the TS. Now the method waits 20s to get a isEmpty in the set. The same local variable is always used to avoid that random buffer allocations triggers spurious errors. This took me a lot of time. 😄

Thanks!

@fl4via fl4via added bug fix Contains bug fix(es) enhancement Enhances existing behaviour or code next release This PR will be merged before next release or has already been merged (for payload double check) labels Mar 11, 2022
@fl4via
Copy link
Member

fl4via commented Mar 11, 2022

I'm marking this as a bug fix as well because of the resumeReads in ReadTimeoutStreamSourceConduit.

@fl4via fl4via merged commit 4314944 into undertow-io:master Mar 11, 2022
@fl4via fl4via removed the next release This PR will be merged before next release or has already been merged (for payload double check) label Apr 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix Contains bug fix(es) enhancement Enhances existing behaviour or code
Projects
None yet
2 participants