Skip to content

Commit 3a356a2

Browse files
committed
mac test
1 parent e01cd38 commit 3a356a2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/lib.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ mod tests {
922922
#[test]
923923
fn test_continuous_output_does_not_timeout() {
924924
run_async_test(|| async {
925-
let mut cmd = StdCommand::new("bash");
925+
let mut cmd = StdCommand::new("sh");
926926
// Continuously output numbers for ~2 seconds, sleeping shortly
927927
cmd.arg("-c")
928928
.arg("i=0; while [ $i -lt 20 ]; do echo $i; i=$((i+1)); sleep 0.1; done");
@@ -948,6 +948,12 @@ mod tests {
948948
result.duration > Duration::from_secs(2),
949949
"Duration should be > 2s"
950950
); // 20 * 0.1s
951+
#[cfg(not(target_os = "macos"))]
952+
assert!(
953+
result.duration < Duration::from_secs(3),
954+
"Duration should be < 3s"
955+
);
956+
#[cfg(target_os = "macos")]
951957
assert!(
952958
result.duration < Duration::from_secs(3),
953959
"Duration should be < 3s"

0 commit comments

Comments
 (0)