Fix test fallout
This commit is contained in:
parent
02e39b05c6
commit
075256a070
@ -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());
|
||||
})
|
||||
|
||||
|
@ -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) }
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user