Repository navigation
test(http-proxy-middleware): avoid SuperTest listener warnings - #1297
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedReview was skipped as selected files did not have any reviewable changes. βοΈ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. π βΉοΈ Recent review infoβοΈ Run configuration
π Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. π WalkthroughWalkthroughThe keep-alive socket contention test now sends concurrent SuperTest requests through an agent bound to one explicitly started HTTP server. The test closes that server in its ChangesProxy contention test
Priority: β¬οΈ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Other Merge Risk: βͺ Minimal Β· up to The shared-server test addresses the startup-listener warning. The remaining narrow startup-error edge case does not block merging. π₯ Pre-merge checks | β 5β Passed checks (5 passed)
β¨ Finishing Touches π‘ 1π οΈ Fix failing CI checks π‘
π Generate docstrings
π§ͺ Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem: yarn test emitted Node MaxListenersExceededWarning messages during the concurrent socket-contention test. Analysis: Twenty concurrent SuperTest requests shared a lazily started server. Each request registered listening, error, and close startup listeners before the server finished listening, exceeding Node's default listener limit. Fix: Start the shared HTTP server before issuing the concurrent requests and close it in the test cleanup path. This preserves concurrency coverage while removing the startup-listener race.
f299080 to
859a174
Compare
commit: |
Fix this warning in tests:
(node:1134) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 listening listeners added to [Server]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limitProblem: yarn test emitted Node MaxListenersExceededWarning messages during the concurrent socket-contention test.
Analysis: Twenty concurrent SuperTest requests shared a lazily started server. Each request registered listening, error, and close startup listeners before the server finished listening, exceeding Node's default listener limit.
Fix: Start the shared HTTP server before issuing the concurrent requests and close it in the test cleanup path. This preserves concurrency coverage while removing the startup-listener race.
Summary by CodeRabbit