Skip to content

test: fix flaky test-http-client-timeout-option-with-agent - #22403

Closed
Trott wants to merge 3 commits into
nodejs:masterfrom
Trott:time-math
Closed

test: fix flaky test-http-client-timeout-option-with-agent#22403
Trott wants to merge 3 commits into
nodejs:masterfrom
Trott:time-math

Conversation

@Trott

Copy link
Copy Markdown
Member

First commit:

There is no guarantee that a timeout won't be delayed considerably due
to unrelated activity on the host. Instead of checking that the timeout
happens within a certain tolerance, simply check that it did not happen
too soon.

Second commit:

test-http-client-timeout-option-with-agent no longer checks that the
timeout happens within a certain tolerance so it can be moved to the
parallel test suite.
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

There is no guarantee that a timeout won't be delayed considerably due
to unrelated activity on the host. Instead of checking that the timeout
happens within a certain tolerance, simply check that it did not happen
too soon.
Fixes: nodejs#22041
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label Aug 19, 2018
@Trott

Copy link
Copy Markdown
MemberAuthor

@Trott

Copy link
Copy Markdown
MemberAuthor

(Fixes: Investigate flaky test-http-client-timeout-option-with-agent #22041)

@Trott

Copy link
Copy Markdown
MemberAuthor

@nodejs/testing

@lpincalpincaAug 19, 2018

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a timeout can expire a little sooner than the specified delay so I'm not sure this resolves the flakiness.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a timeout can expire a little sooner than the specified delay so I'm not sure this resolves the flakiness.

AFAIK it can't, at least not at the millisecond resolution.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this has been fixed in #20555 as per
#10154 (comment).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe actual duration ${duration}ms was less than expected ${HTTP_CLIENT_TIMEOUT}ms.

@TrottTrott added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Aug 19, 2018
@Trott
Trottforce-pushed the time-math branch 2 times, most recently from b832020 to 4475597CompareAugust 19, 2018 23:05
@Trott

Copy link
Copy Markdown
MemberAuthor

CI after applying nit from @refack: https://ci.nodejs.org/job/node-test-pull-request/16583/

@refack

refack commented Aug 19, 2018

Copy link
Copy Markdown
Contributor

I think git no like the change-after-rename:

---
...t-http-client-timeout-option-with-agent.js | 56 +++++++++++++++++++
...t-http-client-timeout-option-with-agent.js | 6 +-
2 files changed, 60 insertions(+), 2 deletions(-)
create mode 100644 test/parallel/test-http-client-timeout-option-with-agent.js
diff --git a/test/parallel/test-http-client-timeout-option-with-agent.js b/test/parallel/test-http-client-timeout-option-with-agent.js
new file mode 100644
index 00000000000..63f683975dc
--- /dev/null
+++ b/test/parallel/test-http-client-timeout-option-with-agent.js
@@ -0,0 +1,56 @@
...
diff --git a/test/sequential/test-http-client-timeout-option-with-agent.js b/test/sequential/test-http-client-timeout-option-with-agent.js
index 63f683975dc..26c93ec55bc 100644
--- a/test/sequential/test-http-client-timeout-option-with-agent.js
+++ b/test/sequential/test-http-client-timeout-option-with-agent.js
@@ -43,8 +43,10 @@ function doRequest() {

P.S. if gets hairy, just ignore my nit.

test-http-client-timeout-option-with-agent no longer checks that the
timeout happens within a certain tolerance so it can be moved to the
parallel test suite.
@Trott

Copy link
Copy Markdown
MemberAuthor

@Trott

Copy link
Copy Markdown
MemberAuthor

@refack

Copy link
Copy Markdown
Contributor

Resume: https://ci.nodejs.org/job/node-test-commit/20741/
(freebsd saw a different flake, linuxone timed out after 5m 🤔 )

@TrottTrott added the fast-track PRs that do not need to wait for 48 hours to land. label Aug 20, 2018
@Trott

Copy link
Copy Markdown
MemberAuthor

Please 👍 here to fast-track.

@refackrefack added the flaky-test Issues and PRs related to the tests with unstable failures on the CI. label Aug 20, 2018
Trott added a commit to Trott/io.js that referenced this pull request Aug 21, 2018
There is no guarantee that a timeout won't be delayed considerably due
to unrelated activity on the host. Instead of checking that the timeout
happens within a certain tolerance, simply check that it did not happen
too soon.
Fixes: nodejs#22041
PR-URL: nodejs#22403
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Trott added a commit to Trott/io.js that referenced this pull request Aug 21, 2018
test-http-client-timeout-option-with-agent no longer checks that the
timeout happens within a certain tolerance so it can be moved to the
parallel test suite.
PR-URL: nodejs#22403
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Trott added a commit to Trott/io.js that referenced this pull request Aug 21, 2018
PR-URL: nodejs#22403
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@Trott

Copy link
Copy Markdown
MemberAuthor

Landed in b1e2612...36696cf

@TrottTrott closed this Aug 21, 2018
targos pushed a commit that referenced this pull request Aug 21, 2018
There is no guarantee that a timeout won't be delayed considerably due
to unrelated activity on the host. Instead of checking that the timeout
happens within a certain tolerance, simply check that it did not happen
too soon.
Fixes: #22041
PR-URL: #22403
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos pushed a commit that referenced this pull request Aug 21, 2018
test-http-client-timeout-option-with-agent no longer checks that the
timeout happens within a certain tolerance so it can be moved to the
parallel test suite.
PR-URL: #22403
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos pushed a commit that referenced this pull request Aug 21, 2018
PR-URL: #22403
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos pushed a commit that referenced this pull request Sep 3, 2018
There is no guarantee that a timeout won't be delayed considerably due
to unrelated activity on the host. Instead of checking that the timeout
happens within a certain tolerance, simply check that it did not happen
too soon.
Fixes: #22041
PR-URL: #22403
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos pushed a commit that referenced this pull request Sep 3, 2018
test-http-client-timeout-option-with-agent no longer checks that the
timeout happens within a certain tolerance so it can be moved to the
parallel test suite.
PR-URL: #22403
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos pushed a commit that referenced this pull request Sep 3, 2018
PR-URL: #22403
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@targostargos mentioned this pull request Sep 5, 2018
@Trott
Trott deleted the time-math branch January 13, 2022 22:50
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.fast-trackPRs that do not need to wait for 48 hours to land.flaky-testIssues and PRs related to the tests with unstable failures on the CI.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@Trott@nodejs-github-bot@refack@lpinca@joyeecheung@BridgeAR