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

Parallel execution of tests causes flakiness when multiple inline_c tests use the same names for environment variables #22

Open
Vibha-Malhotra opened this issue Oct 1, 2024 · 1 comment

Comments

@Vibha-Malhotra
Copy link
Contributor

When multiple inline_c tests in a rust file use the same names of environment variables, flakiness is observed during parallel execution of tests.

For example, if all tests in a rust file need an input directory and an output directory, and environment variables INLINE_C_RS_INPUT_PATH and INLINE_C_RS_OUTPUT_PATH are used to pass these values to assert_c macro, cases fail randomly upon running cargo test. To get around this, one needs to use unique environment variable names in each test.

This should be documented.

Vibha-Malhotra added a commit to Vibha-Malhotra/inline-c-rs that referenced this issue Oct 3, 2024
Added documentation for the flakiness that may arise when multiple inline c tests use the same environment variables. Please refer issue issue [Hywan#22](Hywan#22) for more details.
@Hywan
Copy link
Owner

Hywan commented Oct 7, 2024

Hi,
You're right, that's indeed a dramatic limitation… I am not sure there is a way to workaround that.

Hywan added a commit that referenced this issue Oct 7, 2024
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

No branches or pull requests

2 participants