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

Unit tests should be fast 🐎 #149712

Closed
10 tasks done
jrieken opened this issue May 17, 2022 · 24 comments · Fixed by #202295
Closed
10 tasks done

Unit tests should be fast 🐎 #149712

jrieken opened this issue May 17, 2022 · 24 comments · Fixed by #202295
Assignees
Labels
authentication Issues with the Authentication platform debt Code quality issues engineering VS Code - Build / issue tracking / etc. insiders-released Patch has been released in VS Code Insiders

Comments

@jrieken
Copy link
Member

jrieken commented May 17, 2022

This is a continuation of #134972. A unit test shouldn't take longer than 50ms. An easy way to "speed up" setTimeout and friends is @hediet's runWithFakedTimers-utility

To reproduce these numbers

  • run ./scripts/test.sh --reporter json > ~/Desktop/test_out.json
  • open the file and remove the first non-json lines
  • run jq '.tests | map(select(.duration > 50)) | sort_by(.duration) | [.[] | "- [ ] " + (.duration|tostring) + "ms, " + .fullTitle ]' ~/Desktop/test_out.json

tests slower than 50ms

@sandy081

This comment was marked as resolved.

@Tyriar Tyriar removed their assignment May 17, 2022
@sandy081 sandy081 removed their assignment May 17, 2022
@sandy081

This comment was marked as resolved.

@Tyriar

This comment was marked as resolved.

@sandy081

This comment was marked as resolved.

wannieman98 pushed a commit to wannieman98/vscode that referenced this issue May 17, 2022
@jrieken jrieken assigned sandy081 and unassigned alexr00 May 19, 2022
@sandy081

This comment was marked as resolved.

@TylerLeonhardt TylerLeonhardt modified the milestones: May 2023, June 2023 May 26, 2023
@TylerLeonhardt TylerLeonhardt modified the milestones: June 2023, July 2023 Jun 27, 2023
@TylerLeonhardt TylerLeonhardt removed their assignment Jul 24, 2023
@mjbvz mjbvz modified the milestones: July 2023, August 2023 Jul 25, 2023
@mjbvz mjbvz modified the milestones: August 2023, September 2023 Aug 29, 2023
@mjbvz mjbvz modified the milestones: September 2023, October 2023 Sep 26, 2023
@mjbvz mjbvz modified the milestones: October 2023, November 2023 Oct 24, 2023
@mjbvz mjbvz modified the milestones: November 2023, December 2023 Nov 21, 2023
mjbvz added a commit to mjbvz/vscode that referenced this issue Jan 11, 2024
mjbvz added a commit that referenced this issue Jan 12, 2024
@vscodenpa vscodenpa added the unreleased Patch has not yet been released in VS Code Insiders label Jan 12, 2024
@azuregogo
Copy link

azuregogo commented Jan 12, 2024 via email

@vscodenpa vscodenpa added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Jan 12, 2024
@aiday-mar aiday-mar added this to the December / January 2024 milestone Feb 6, 2024
@microsoft microsoft locked and limited conversation to collaborators Jun 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
authentication Issues with the Authentication platform debt Code quality issues engineering VS Code - Build / issue tracking / etc. insiders-released Patch has been released in VS Code Insiders
Projects
None yet
Development

Successfully merging a pull request may close this issue.