Skip to content

Commit e99d523

Browse files
committed
auto merge of #12880 : tedhorst/rust/master, r=alexcrichton
Fix a test that was missed in the chan/port renaming (PR #12815). This was missed because it is skipped on linux and windows, and the mac bots were moving at the time the PR landed.
2 parents 2585803 + e9bd121 commit e99d523

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/test/run-pass/tcp-stress.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ fn main() {
2828
});
2929

3030
let addr = SocketAddr { ip: Ipv4Addr(127, 0, 0, 1), port: 0 };
31-
let (p, c) = Chan::new();
31+
let (tx, rx) = channel();
3232
spawn(proc() {
3333
let mut listener = TcpListener::bind(addr).unwrap();
34-
c.send(listener.socket_name().unwrap());
34+
tx.send(listener.socket_name().unwrap());
3535
let mut acceptor = listener.listen();
3636
loop {
3737
let mut stream = match acceptor.accept() {
@@ -45,11 +45,11 @@ fn main() {
4545
stream.write([2]);
4646
}
4747
});
48-
let addr = p.recv();
48+
let addr = rx.recv();
4949

50-
let (p, c) = Chan::new();
50+
let (tx, rx) = channel();
5151
for _ in range(0, 1000) {
52-
let c = c.clone();
52+
let tx = tx.clone();
5353
spawn(proc() {
5454
match TcpStream::connect(addr) {
5555
Ok(stream) => {
@@ -60,15 +60,15 @@ fn main() {
6060
},
6161
Err(e) => debug!("{:?}", e)
6262
}
63-
c.send(());
63+
tx.send(());
6464
});
6565
}
6666

6767
// Wait for all clients to exit, but don't wait for the server to exit. The
6868
// server just runs infinitely.
69-
drop(c);
69+
drop(tx);
7070
for _ in range(0, 1000) {
71-
p.recv();
71+
rx.recv();
7272
}
7373
unsafe { libc::exit(0) }
7474
}

0 commit comments

Comments
 (0)