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

Create predictably named test directories #3194

Merged
merged 2 commits into from
Feb 13, 2024

Conversation

Janpot
Copy link
Member

@Janpot Janpot commented Feb 10, 2024

Avoid vite configs changing and triggering dependency optimization.

This replaces the random test directory name with one that's based on the parallel index of the current worker. If amount of workers is set at 1 (which we already do), the tests will always operate on the same folder and the dependency optimization won't invalidate.

@Janpot Janpot added the core Infrastructure work going on behind the scenes label Feb 10, 2024
@Janpot Janpot marked this pull request as ready for review February 10, 2024 11:08
@Janpot Janpot requested a review from a team February 10, 2024 11:10
@@ -58,9 +58,23 @@ interface LocalServerConfig {
env?: Record<string, string>;
base?: string;
}
export async function getTemporaryDir() {
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need this function? I see it's only being used in a custom server test now, not sure if it could be replaced there too?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, it's using a random directory that's different from the test directory

@apedroferreira
Copy link
Member

apedroferreira commented Feb 12, 2024

Oh, unrelated but could we gitignore these temporary test folders?

@Janpot
Copy link
Member Author

Janpot commented Feb 13, 2024

Oh, unrelated but could we gitignore these temporary test folders?

I've thought about it as well, but ideally you remove them instead of ignoring

@Janpot Janpot merged commit fc9b068 into mui:master Feb 13, 2024
11 checks passed
@Janpot Janpot deleted the predictable-tets-dirs branch February 13, 2024 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants