Fix test fallout

This commit is contained in:
Brian Anderson 2014-08-13 15:26:48 -07:00
parent 02e39b05c6
commit 075256a070
2 changed files with 4 additions and 3 deletions

View File

@ -99,11 +99,11 @@ iotest!(fn timeout_error() {
iotest!(fn connect_timeout_zero() {
let addr = next_test_ip4();
assert!(TcpStream::connect_timeout(&addr, Duration::milliseconds(0)).is_err());
assert!(TcpStream::connect_timeout(addr, Duration::milliseconds(0)).is_err());
})
iotest!(fn connect_timeout_negative() {
let addr = next_test_ip4();
assert!(TcpStream::connect_timeout(&addr, Duration::milliseconds(-1)).is_err());
assert!(TcpStream::connect_timeout(addr, Duration::milliseconds(-1)).is_err());
})

View File

@ -23,6 +23,7 @@ extern crate debug;
use std::io::net::tcp::{TcpListener, TcpStream};
use std::io::{Acceptor, Listener};
use std::task::TaskBuilder;
use std::time::Duration;
#[start]
fn start(argc: int, argv: *const *const u8) -> int {
@ -33,7 +34,7 @@ fn main() {
// This test has a chance to time out, try to not let it time out
spawn(proc() {
use std::io::timer;
timer::sleep(30 * 1000);
timer::sleep(Duration::milliseconds(30 * 1000));
println!("timed out!");
unsafe { libc::exit(1) }
});