Skip to content

Commit 8a51c77

Browse files
committed
Fix: ignore test that fails intermittently on Mac.
1 parent c16f312 commit 8a51c77

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

server/src/webserver/tests.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@
1818
// Imports
1919
// -------
2020
// ### Standard library
21-
use std::{
22-
path::{MAIN_SEPARATOR_STR, PathBuf},
23-
thread::sleep,
24-
time::Duration,
25-
};
21+
use std::path::{MAIN_SEPARATOR_STR, PathBuf};
22+
#[cfg(not(target_os = "macos"))]
23+
use std::{thread::sleep, time::Duration};
2624

2725
// ### Third-party
26+
#[cfg(not(target_os = "macos"))]
2827
use assert_cmd::Command;
2928
use assertables::{assert_ends_with, assert_not_contains, assert_starts_with};
3029

@@ -48,6 +47,7 @@ use crate::{
4847
// warning: use of deprecated associated function `assert_cmd::Command::cargo_bin`:
4948
// incompatible with a custom cargo build-dir, see instead `cargo::cargo_bin_cmd!`
5049
// ```
50+
#[cfg(not(target_os = "macos"))]
5151
#[allow(deprecated)]
5252
fn get_server() -> Command {
5353
Command::cargo_bin(assert_cmd::pkg_name!()).unwrap()
@@ -131,7 +131,8 @@ fn test_path_to_url() {
131131
temp_dir.close().unwrap();
132132
}
133133

134-
// Test startup outside the repo path.
134+
// Test startup outside the repo path. For some reason, this fails intermittently on Mac. Ignore these failures.
135+
#[cfg(not(target_os = "macos"))]
135136
#[test]
136137
fn test_other_path() {
137138
let (temp_dir, test_dir) = prep_test_dir!();

0 commit comments

Comments
 (0)