Skip timeout upper bound check on windows

This commit is contained in:
Steven Fackler 2015-05-29 00:21:06 -07:00
parent 69a0e1af95
commit 39abcef0a7
2 changed files with 12 additions and 4 deletions

View File

@ -941,7 +941,9 @@ mod tests {
assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut);
});
assert!(wait > Duration::from_millis(5));
assert!(wait < Duration::from_millis(15));
// windows will sometimes extend this by ~500ms, so we'll just take the
// fact that we did time out as a win :(
assert!(cfg!(windows) || wait < Duration::from_millis(15));
}
#[test]
@ -964,6 +966,8 @@ mod tests {
assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut);
});
assert!(wait > Duration::from_millis(5));
assert!(wait < Duration::from_millis(15));
// windows will sometimes extend this by ~500ms, so we'll just take the
// fact that we did time out as a win :(
assert!(cfg!(windows) || wait < Duration::from_millis(15));
}
}

View File

@ -397,7 +397,9 @@ mod tests {
assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut);
});
assert!(wait > Duration::from_millis(5));
assert!(wait < Duration::from_millis(15));
// windows will sometimes extend this by ~500ms, so we'll just take the
// fact that we did time out as a win :(
assert!(cfg!(windows) || wait < Duration::from_millis(15));
}
#[test]
@ -418,6 +420,8 @@ mod tests {
assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut);
});
assert!(wait > Duration::from_millis(5));
assert!(wait < Duration::from_millis(15));
// windows will sometimes extend this by ~500ms, so we'll just take the
// fact that we did time out as a win :(
assert!(cfg!(windows) || wait < Duration::from_millis(15));
}
}