diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-03-09 17:18:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-09 17:18:27 +0100 |
| commit | 02c9928f446cc96aed19d8eb4df0aa3602877ffa (patch) | |
| tree | 06c88558f1405dc59f34bc138a70ab1ed0b913e9 /src/libstd | |
| parent | f67efe9d3a68b353a8021c6c6bc80a496a57e13f (diff) | |
| parent | 6465257e5442b489a1d4469d3f613aeb637e3665 (diff) | |
| download | rust-02c9928f446cc96aed19d8eb4df0aa3602877ffa.tar.gz rust-02c9928f446cc96aed19d8eb4df0aa3602877ffa.zip | |
Rollup merge of #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 #52590
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/net/tcp.rs | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs index 275557da96f..ce0c5c0bb0d 100644 --- a/src/libstd/net/tcp.rs +++ b/src/libstd/net/tcp.rs @@ -1743,21 +1743,6 @@ mod tests { } #[test] - fn connect_timeout_unbound() { - // bind and drop a socket to track down a "probably unassigned" port - let socket = TcpListener::bind("127.0.0.1:0").unwrap(); - let addr = socket.local_addr().unwrap(); - drop(socket); - - let timeout = Duration::from_secs(1); - let e = TcpStream::connect_timeout(&addr, timeout).unwrap_err(); - assert!(e.kind() == io::ErrorKind::ConnectionRefused || - e.kind() == io::ErrorKind::TimedOut || - e.kind() == io::ErrorKind::Other, - "bad error: {} {:?}", e, e.kind()); - } - - #[test] fn connect_timeout_valid() { let listener = TcpListener::bind("127.0.0.1:0").unwrap(); let addr = listener.local_addr().unwrap(); |
