carols10cents / cargo-open

A third-party cargo extension to allow you to open a dependent crate in your $EDITOR
Apache License 2.0
22 stars 5 forks source link

Sometimes test `prefer_visual_over_editor` #13

Closed czipperz closed 7 years ago

czipperz commented 8 years ago

When repetitively running cargo test, occasionally some of the tests (usually tests::prefer_visual_over_editor) will fail. The reason for this is inconsistent, and seems to me like a potential data race situation. Examples:

---- tests::check_env_editor stdout ----
        thread 'tests::check_env_editor' panicked at 'assertion failed: `(left == right)` (left: `"some_editor"`, right: `"some_cargo_editor"`)', src/main.rs:117
---- tests::prefer_visual_over_editor stdout ----
        thread 'tests::prefer_visual_over_editor' panicked at 'Cannot find an editor. Please specify one of $CARGO_EDITOR, $VISUAL, or $EDITOR and try again.', src/libcore/option.rs:335
---- tests::prefer_visual_over_editor stdout ----
        thread 'tests::prefer_visual_over_editor' panicked at 'assertion failed: `(left == right)` (left: `"some_visual"`, right: `"some_cargo_editor"`)', src/main.rs:153
czipperz commented 8 years ago

Another example

---- tests::prefer_cargo_editor_over_visual_and_editor stdout ----
        thread 'tests::prefer_cargo_editor_over_visual_and_editor' panicked at 'assertion failed: `(left == right)` (left: `"some_cargo_editor"`, right: `"some_visual"`)', src/main.rs:175
Cldfire commented 7 years ago

Did you read this section of the README?

https://github.com/carols10cents/cargo-open#running-tests

czipperz commented 7 years ago

Honestly no.