Skip to content

Commit 7ea10a1

Browse files
committed
Remove deprecated methods in tests
1 parent 811b0ff commit 7ea10a1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/test.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ fn test_notifications_next_block() {
599599

600600
let _t = thread::spawn(|| {
601601
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", SslMode::None));
602-
thread::sleep_ms(500);
602+
thread::sleep(Duration::from_millis(500));
603603
or_panic!(conn.execute("NOTIFY test_notifications_next_block, 'foo'", &[]));
604604
});
605605

@@ -618,9 +618,9 @@ fn test_notification_next_timeout() {
618618

619619
let _t = thread::spawn(|| {
620620
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", SslMode::None));
621-
thread::sleep_ms(500);
621+
thread::sleep(Duration::from_millis(500));
622622
or_panic!(conn.execute("NOTIFY test_notifications_next_timeout, 'foo'", &[]));
623-
thread::sleep_ms(1500);
623+
thread::sleep(Duration::from_millis(1500));
624624
or_panic!(conn.execute("NOTIFY test_notifications_next_timeout, 'foo'", &[]));
625625
});
626626

@@ -642,7 +642,7 @@ fn test_cancel_query() {
642642
let cancel_data = conn.cancel_data();
643643

644644
let _t = thread::spawn(move || {
645-
thread::sleep_ms(500);
645+
thread::sleep(Duration::from_millis(500));
646646
assert!(postgres::cancel_query("postgres://postgres@localhost", SslMode::None,
647647
cancel_data).is_ok());
648648
});

0 commit comments

Comments
 (0)