-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Improve Netty4IncrementalRequestHandlingIT
#127111
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
Improve Netty4IncrementalRequestHandlingIT
#127111
Conversation
* Verifies that each call to `Netty4HttpRequestBodyStream#next` yields exactly one chunk (or the stream is closed) since the `IncrementalBulkService` relies on this property. * Replaces several busy-waits with ones that block on a future for faster test execution. * Replaces several hard-coded constants with randomized values to clarify that the precise value does not matter to the test. * Reduces the use of unnecessary abbreviations in names. * Reduce the use of global static state in favour of node-local components.
Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ing-chunk-at-once
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
} | ||
assertBusy(() -> assertEquals("should receive all server responses", totalRequests, ctx.clientRespQueue.size())); | ||
} | ||
} | ||
|
||
// ensures content integrity, no loses and re-order |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit typo "losses"
…ing-chunk-at-once
Re-applying elastic#126441 with the extra `FlowControlHandler` needed to ensure one-chunk-per-read semantics - see elastic#127111 for related tests.
Verifies that each call to
Netty4HttpRequestBodyStream#next
yieldsexactly one chunk (or the stream is closed) since the
IncrementalBulkService
relies on this property.Replaces several busy-waits with ones that block on a future for
faster test execution.
Replaces several hard-coded constants with randomized values to
clarify that the precise value does not matter to the test.
Reduces the use of unnecessary abbreviations in names.
Reduce the use of global static state in favour of node-local
components.