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

fix: incorrectly setting the name of currently running concurrent test #14335

Merged
merged 2 commits into from
Jul 21, 2023

Conversation

dmitri-gb
Copy link
Contributor

Summary

There was a bug in my previous submission (#14139).

Test functions lose their async context when throttled by p-limit. This caused snapshot matchers not to work properly when the number of concurrent tests in a file was greater than the maxConcurrency config option (which is 5 by default).

The fix is to set AsyncLocalStorage inside the throttled function.

Test plan

Verified manually.

Test functions lose their async context when throttled by p-limit. This
caused snapshot matchers not to work properly when the number of
concurrent tests in a file was greater than the maxConcurrency config
option.

The fix is to set AsyncLocalStorage inside the throttled function.
@netlify
Copy link

netlify bot commented Jul 16, 2023

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 7a174cd
🔍 Latest deploy log https://app.netlify.com/sites/jestjs/deploys/64b4739ddfe6f3000806c99d
😎 Deploy Preview https://deploy-preview-14335--jestjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@mrazauskas mrazauskas left a comment

Choose a reason for hiding this comment

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

Good catch! Thanks.

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

Great catch!

@SimenB
Copy link
Member

SimenB commented Jul 27, 2023

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants