Stub support for streaming-transport request handlers in MockTransportService#21581
Conversation
…tService Adds Node.wrapStreamTransport hook so MockNode can wrap the streaming transport before it's shared between TransportService and StreamTransportService. MockTransportService.addRequestHandlingBehavior falls back to the streaming-transport's stub registry when the action isn't on the regular transport — needed for streaming-only handlers (e.g. when FlightStreamPlugin is loaded). Demonstrated by a new sandbox/qa/analytics-engine-coordinator IT that stubs FragmentExecutionAction (streaming-only) end-to-end, plus a deterministic unit test for a lookahead-reordering bug surfaced via this infrastructure: the listener was offloading onStreamResponse bodies to a thread pool, letting the isLast=true task race ahead of earlier batches and drop them via the SUCCEEDED short-circuit. Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit a11e140.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
|
new package adds / deps are for new sandbox/qa module to stress test coordinator e2e |
Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
|
❌ Gradle check result for a11e140: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #21581 +/- ##
============================================
+ Coverage 73.48% 73.50% +0.01%
+ Complexity 74646 74602 -44
============================================
Files 5980 5980
Lines 338777 338778 +1
Branches 48848 48848
============================================
+ Hits 248964 249016 +52
+ Misses 70026 69922 -104
- Partials 19787 19840 +53 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
d790b71
into
opensearch-project:main
Description
This change adds stub support for InternalClusterTests to stub streaming responses in tests. Also includes a sandbox/qa module that uses it with a simple test case, a bug it uncovered, and a deterministic unit test for the fix.
Related Issues
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.