Skip to content

Commit 90b2fe2

Browse files
committed
Fix flaky test.
FD 3 might not be used already.
1 parent fca5c8a commit 90b2fe2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ mod tests {
285285
let file = File::open("testdata/file1.txt").unwrap();
286286
let file_fd = file.as_raw_fd();
287287
command.preserved_fds(vec![file_fd]);
288-
assert!(file_fd > 3);
288+
assert!(file_fd > 2);
289289

290290
let output = command.output().unwrap();
291291
expect_fds(&output, &[0, 1, 2, 3, file_fd], 0);
@@ -404,7 +404,7 @@ mod tests {
404404
for entry in dir {
405405
let entry = entry.unwrap();
406406
let fd: RawFd = entry.file_name().to_str().unwrap().parse().unwrap();
407-
if fd > 3 {
407+
if fd > 2 {
408408
close(fd).unwrap();
409409
}
410410
}

0 commit comments

Comments
 (0)