Skip to content

Commit a0c757a

Browse files
committed
Remove useless unit tests
1 parent 30e1c1a commit a0c757a

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

library/std/src/net/tcp/tests.rs

-21
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,6 @@ fn connect_error() {
4646
}
4747
}
4848

49-
#[test]
50-
fn connect_timeout_to_unreachable_address() {
51-
let now = Instant::now();
52-
match TcpStream::connect_timeout(&format!("1.1.1.1:9999").parse().unwrap(), Duration::MAX) {
53-
Ok(..) => panic!("connected to an unreachable address, this is impossible"),
54-
Err(e) => assert_eq!(e.kind(), ErrorKind::TimedOut),
55-
}
56-
57-
assert!(now.elapsed() > Duration::from_secs(20));
58-
}
59-
6049
#[test]
6150
#[cfg_attr(target_env = "sgx", ignore)] // FIXME: https://github.com/fortanix/rust-sgx/issues/31
6251
fn connect_timeout_error() {
@@ -68,16 +57,6 @@ fn connect_timeout_error() {
6857
assert!(TcpStream::connect_timeout(&socket_addr, Duration::MAX).is_ok());
6958
}
7059

71-
#[test]
72-
fn connect_timeout_ok_bind() {
73-
let listener = TcpListener::bind("127.0.0.1:0").unwrap(); // :0 picks some free port
74-
let port = listener.local_addr().unwrap().port(); // obtain the port it picked
75-
assert!(
76-
TcpStream::connect_timeout(&format!("127.0.0.1:{port}").parse().unwrap(), Duration::MAX)
77-
.is_ok()
78-
);
79-
}
80-
8160
#[test]
8261
fn listen_localhost() {
8362
let socket_addr = next_test_ip4();

0 commit comments

Comments
 (0)