Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_runner: Fix mock timer promisified setInterval return value #50331

Merged
merged 3 commits into from Oct 25, 2023

Conversation

mika-fischer
Copy link
Contributor

promisified setInterval can be passed a value that is returned by the async iterable. The mocked promisified setInterval used this value for its own purposes. This brings the mocked version in line with the original.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/test_runner

@atlowChemi atlowChemi added request-ci Add this label to start a Jenkins CI on a PR. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Oct 23, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 23, 2023
@nodejs-github-bot
Copy link
Collaborator

@mika-fischer mika-fischer force-pushed the fix-50307 branch 2 times, most recently from 02d7e2e to e65beea Compare October 23, 2023 08:41
@MoLow MoLow added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 23, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 23, 2023
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@ErickWendel ErickWendel left a comment

Choose a reason for hiding this comment

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

LGTM. @mika-fischer congrats on your first PR on the nodejs repo!! It's really helpful!

@MoLow
Copy link
Member

MoLow commented Oct 23, 2023

@mika-fischer the PR needs a rebase

promisified setInterval can be passed a value that is returned by the
async iterable. The mocked promisified setInterval used this value for
its own purposes. This brings the mocked version in line with the
original.

Fixes: nodejs#50307
Some tests relied on the custom return value and were broken by the
change to always return the value provided by the caller.
@mika-fischer
Copy link
Contributor Author

LGTM. @mika-fischer congrats on your first PR on the nodejs repo!! It's really helpful!

Thanks @ErickWendel!

@mika-fischer
Copy link
Contributor Author

@mika-fischer the PR needs a rebase

done @MoLow

@MoLow MoLow added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 23, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 23, 2023
@nodejs-github-bot
Copy link
Collaborator

@mika-fischer
Copy link
Contributor Author

I'm not sure why some tests are failing, these seem unrelated to the changes in this PR. Let me know if there's anything I can do to move this along.

@nodejs-github-bot
Copy link
Collaborator

@MoLow MoLow added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 23, 2023
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Oct 24, 2023
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/50331
✔  Done loading data for nodejs/node/pull/50331
----------------------------------- PR info ------------------------------------
Title      test_runner: Fix mock timer promisified setInterval return value (#50331)
Author     Mika Fischer  (@mika-fischer, first-time contributor)
Branch     mika-fischer:fix-50307 -> nodejs:main
Labels     author ready, needs-ci, commit-queue-squash, test_runner
Commits    3
 - test_runner: test return value of mocked promisified timers
 - test_runner: fix mock timer promisified setInterval return value
 - test_runner: fix mock timer setInterval tests
Committers 1
 - Mika Fischer 
PR-URL: https://github.com/nodejs/node/pull/50331
Reviewed-By: Moshe Atlow 
Reviewed-By: Chemi Atlow 
Reviewed-By: Erick Wendel 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/50331
Reviewed-By: Moshe Atlow 
Reviewed-By: Chemi Atlow 
Reviewed-By: Erick Wendel 
--------------------------------------------------------------------------------
   ⚠  Commits were pushed since the last approving review:
   ⚠  - test_runner: test return value of mocked promisified timers
   ⚠  - test_runner: fix mock timer promisified setInterval return value
   ⚠  - test_runner: fix mock timer setInterval tests
   ℹ  This PR was created on Sun, 22 Oct 2023 20:11:55 GMT
   ✔  Approvals: 3
   ✔  - Moshe Atlow (@MoLow) (TSC): https://github.com/nodejs/node/pull/50331#pullrequestreview-1692229637
   ✔  - Chemi Atlow (@atlowChemi): https://github.com/nodejs/node/pull/50331#pullrequestreview-1691892475
   ✔  - Erick Wendel (@erickwendel): https://github.com/nodejs/node/pull/50331#pullrequestreview-1692276984
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2023-10-23T18:44:37Z: https://ci.nodejs.org/job/node-test-pull-request/55158/
- Querying data for job/node-test-pull-request/55158/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/6632107907

@MoLow MoLow added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Oct 25, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 25, 2023
@nodejs-github-bot nodejs-github-bot merged commit 4f5db8b into nodejs:main Oct 25, 2023
59 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 4f5db8b

@mika-fischer mika-fischer deleted the fix-50307 branch October 25, 2023 07:29
@mika-fischer
Copy link
Contributor Author

Did the closure of #50307 get dropped somehow? Should I have specified it differently? Should I close the issue now manually?

@benjamingr
Copy link
Member

Typically it needs Fixes: or Closes: in the PR description for GH to pick it up.

Thank you for your contribution!

alexfernandez pushed a commit to alexfernandez/node that referenced this pull request Nov 1, 2023
PR-URL: nodejs#50331
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
targos pushed a commit that referenced this pull request Nov 11, 2023
PR-URL: #50331
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
UlisesGascon pushed a commit that referenced this pull request Dec 11, 2023
PR-URL: #50331
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
@UlisesGascon UlisesGascon mentioned this pull request Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. test_runner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

node test mock timer promisified setTimeout & setInterval don't always return the specified value
6 participants