test: clean up http-set-trailers · nodejs/node@3fb0f7e · GitHub
Skip to content

Commit 3fb0f7e

Browse files
lundibundiMylesBorins
authored andcommitted
test: clean up http-set-trailers
* remove shared state of request counting from each listener by using callbacks to report test finish. This also fixes slight race condition where one of the request could finish before the other was taken into account resulting in ECONNREFUSED due to premature server.close() * slightly move code for better cohesion * fix error comment in testHttp10 'Trailer ...' -> 'No trailer ...' PR-URL: #30522 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
1 parent 80bfc08 commit 3fb0f7e

1 file changed

Lines changed: 29 additions & 43 deletions

File tree

test/parallel/test-http-set-trailers.js

Lines changed: 29 additions & 43 deletions

0 commit comments

Comments
 (0)