Remove deprecated methods in tests

This commit is contained in:
Steven Fackler
2015-12-05 18:57:17 -08:00
parent 811b0ffde9
commit 7ea10a151e

View File

@@ -599,7 +599,7 @@ fn test_notifications_next_block() {
let _t = thread::spawn(|| {
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", SslMode::None));
thread::sleep_ms(500);
thread::sleep(Duration::from_millis(500));
or_panic!(conn.execute("NOTIFY test_notifications_next_block, 'foo'", &[]));
});
@@ -618,9 +618,9 @@ fn test_notification_next_timeout() {
let _t = thread::spawn(|| {
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", SslMode::None));
thread::sleep_ms(500);
thread::sleep(Duration::from_millis(500));
or_panic!(conn.execute("NOTIFY test_notifications_next_timeout, 'foo'", &[]));
thread::sleep_ms(1500);
thread::sleep(Duration::from_millis(1500));
or_panic!(conn.execute("NOTIFY test_notifications_next_timeout, 'foo'", &[]));
});
@@ -642,7 +642,7 @@ fn test_cancel_query() {
let cancel_data = conn.cancel_data();
let _t = thread::spawn(move || {
thread::sleep_ms(500);
thread::sleep(Duration::from_millis(500));
assert!(postgres::cancel_query("postgres://postgres@localhost", SslMode::None,
cancel_data).is_ok());
});