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()); });