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

chore: site builder should infer directory name from tests #6274

Merged
merged 4 commits into from
Dec 22, 2023

Conversation

Skn0tt
Copy link
Contributor

@Skn0tt Skn0tt commented Dec 22, 2023

Lots of our tests use withSiteBuilder. I noticed that on Windows, we're seeing a lot of "Resource Busy or locked" exceptions when the site builder tries to clean up the directory it created. The resources are "busy", because we re-used the same sitename between a lot of our tests, so they ended up using the same directories - possibly a race condition. I'm assuming this comes from copy&paste.

This PR adds a new signature to withSiteBuilder that infers the site name based on the test name. Since we always adapt test names, this should work way better! Some of the usage i've already transitioned. To encourage folks to transition the rest as well, i've marked the old signature as deprecated.

@Skn0tt Skn0tt self-assigned this Dec 22, 2023
@Skn0tt Skn0tt requested a review from a team as a code owner December 22, 2023 10:06
@Skn0tt Skn0tt changed the title Site builder infer name from test chore: site builder should infer directory name from tests Dec 22, 2023
Copy link

📊 Benchmark results

Comparing with 5d6bcf3

  • Dependency count: 1,399 (no change)
  • Package size: 405 MB (no change)
  • Number of ts-expect-error directives: 1,231 (no change)

@Skn0tt Skn0tt merged commit f396f61 into main Dec 22, 2023
35 checks passed
@Skn0tt Skn0tt deleted the site-builder-infer-name-from-test branch December 22, 2023 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants