Skip to content

test: clean up http-set-trailers - #30522

Closed
lundibundi wants to merge 2 commits into
nodejs:masterfrom
lundibundi:improve-test-http-set-trailers
Closed

test: clean up http-set-trailers#30522
lundibundi wants to merge 2 commits into
nodejs:masterfrom
lundibundi:improve-test-http-set-trailers

Conversation

@lundibundi

@lundibundi lundibundi commented Nov 18, 2019

Copy link
Copy Markdown
Member
  • 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 ...'
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

/cc @nodejs/testing @nodejs/http

* 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 ...'
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to Node.js core tests and test infrastructure. label Nov 18, 2019
@lundibundi lundibundi added the http Issues and PRs related to the http subsystem. label Nov 18, 2019
Comment thread test/parallel/test-http-set-trailers.js Outdated
Comment thread test/parallel/test-http-set-trailers.js Outdated
@Trott

Trott commented Nov 20, 2019

Copy link
Copy Markdown
Member

Is this likely to be a fix for #30523? (Seems like it to me.)

@Trott Trott added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Nov 20, 2019
@Trott

Trott commented Nov 20, 2019

Copy link
Copy Markdown
Member

Landed in a30a9f8

@Trott Trott closed this Nov 20, 2019
Trott pushed a commit that referenced this pull request Nov 20, 2019
* 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>
MylesBorins pushed a commit that referenced this pull request Nov 21, 2019
* 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>
@BridgeAR BridgeAR mentioned this pull request Nov 21, 2019
targos pushed a commit that referenced this pull request Dec 1, 2019
* 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>
@BethGriggs BethGriggs mentioned this pull request Dec 9, 2019
MylesBorins pushed a commit that referenced this pull request Dec 17, 2019
* 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>
@BethGriggs BethGriggs mentioned this pull request Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. http Issues and PRs related to the http subsystem. test Issues and PRs related to Node.js core tests and test infrastructure.

5 participants