From 7ea10a151e60a42c6e5d6086cb8f7a75f3386564 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sat, 5 Dec 2015 18:57:17 -0800 Subject: [PATCH] Remove deprecated methods in tests --- tests/test.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test.rs b/tests/test.rs index cae607b7..16b9fac2 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -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()); });