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 flaky tests that use std::env::set_var #253

Merged
merged 1 commit into from
Oct 14, 2023

Commits on Sep 28, 2023

  1. fix: flaky tests

    Fix flaky tests that use `std::env::set_var`.
    
    `std::env::set_var` is not safe to be used in parallel.
    
    Reproducer:
    ``` bash
    for _ in {0..100}; do
      cargo t current_dir || exit 1
    done
    ```
    Will fail very fast.
    
    Doesn't fail:
    ```bash
    for _ in {0..100}; do
      cargo t current_dir_prefers_pwd_env_var || exit 1
      cargo t current_dir_uses_dereferenced_path_when_pwd_env_var_not_set || exit 1
    done
    ```
    
    Reference: rust-lang/rust#27970
    a-kenji committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    6e5f588 View commit details
    Browse the repository at this point in the history