Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit aba3c79

Browse files
authoredMar 9, 2019
Rollup merge of rust-lang#59018 - alexcrichton:omg, r=sfackler
std: Delete a by-definition spuriously failing test This commit deletes the `connect_timeout_unbound` test from the standard library which, unfortunately, is by definition eventually going to be a spuriously failing test. There's no way to reserve a port as unbound so we can rely on ecosystem testing for this feature for now. Closes rust-lang#52590
2 parents 081cf87 + 6465257 commit aba3c79

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed
 

‎src/libstd/net/tcp.rs

-15
Original file line numberDiff line numberDiff line change
@@ -1742,21 +1742,6 @@ mod tests {
17421742
})
17431743
}
17441744

1745-
#[test]
1746-
fn connect_timeout_unbound() {
1747-
// bind and drop a socket to track down a "probably unassigned" port
1748-
let socket = TcpListener::bind("127.0.0.1:0").unwrap();
1749-
let addr = socket.local_addr().unwrap();
1750-
drop(socket);
1751-
1752-
let timeout = Duration::from_secs(1);
1753-
let e = TcpStream::connect_timeout(&addr, timeout).unwrap_err();
1754-
assert!(e.kind() == io::ErrorKind::ConnectionRefused ||
1755-
e.kind() == io::ErrorKind::TimedOut ||
1756-
e.kind() == io::ErrorKind::Other,
1757-
"bad error: {} {:?}", e, e.kind());
1758-
}
1759-
17601745
#[test]
17611746
fn connect_timeout_valid() {
17621747
let listener = TcpListener::bind("127.0.0.1:0").unwrap();

0 commit comments

Comments
 (0)
Please sign in to comment.