Update for upstream changes
This commit is contained in:
parent
a35af16926
commit
cdfcef8e05
@ -23,8 +23,8 @@ path = "tests/test.rs"
|
|||||||
default = ["uuid"]
|
default = ["uuid"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
phf = "0.2"
|
phf = "0.3"
|
||||||
phf_mac = "0.2"
|
phf_mac = "0.3"
|
||||||
openssl = "0.2.1"
|
openssl = "0.2.1"
|
||||||
time = "0.1"
|
time = "0.1"
|
||||||
log = "0.1"
|
log = "0.1"
|
||||||
|
@ -623,7 +623,7 @@ fn test_notifications_next_block() {
|
|||||||
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
|
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
|
||||||
or_panic!(conn.execute("LISTEN test_notifications_next_block", &[]));
|
or_panic!(conn.execute("LISTEN test_notifications_next_block", &[]));
|
||||||
|
|
||||||
spawn(proc() {
|
spawn(|| {
|
||||||
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
|
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
|
||||||
timer::sleep(Duration::milliseconds(500));
|
timer::sleep(Duration::milliseconds(500));
|
||||||
or_panic!(conn.execute("NOTIFY test_notifications_next_block, 'foo'", &[]));
|
or_panic!(conn.execute("NOTIFY test_notifications_next_block, 'foo'", &[]));
|
||||||
@ -642,7 +642,7 @@ fn test_notifications_next_block_for() {
|
|||||||
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
|
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
|
||||||
or_panic!(conn.execute("LISTEN test_notifications_next_block_for", &[]));
|
or_panic!(conn.execute("LISTEN test_notifications_next_block_for", &[]));
|
||||||
|
|
||||||
spawn(proc() {
|
spawn(|| {
|
||||||
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
|
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
|
||||||
timer::sleep(Duration::milliseconds(500));
|
timer::sleep(Duration::milliseconds(500));
|
||||||
or_panic!(conn.execute("NOTIFY test_notifications_next_block_for, 'foo'", &[]));
|
or_panic!(conn.execute("NOTIFY test_notifications_next_block_for, 'foo'", &[]));
|
||||||
@ -661,7 +661,7 @@ fn test_notifications_next_block_for_timeout() {
|
|||||||
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
|
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
|
||||||
or_panic!(conn.execute("LISTEN test_notifications_next_block_for_timeout", &[]));
|
or_panic!(conn.execute("LISTEN test_notifications_next_block_for_timeout", &[]));
|
||||||
|
|
||||||
spawn(proc() {
|
spawn(|| {
|
||||||
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
|
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
|
||||||
timer::sleep(Duration::seconds(2));
|
timer::sleep(Duration::seconds(2));
|
||||||
or_panic!(conn.execute("NOTIFY test_notifications_next_block_for_timeout, 'foo'", &[]));
|
or_panic!(conn.execute("NOTIFY test_notifications_next_block_for_timeout, 'foo'", &[]));
|
||||||
@ -683,7 +683,7 @@ fn test_cancel_query() {
|
|||||||
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
|
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", &SslMode::None));
|
||||||
let cancel_data = conn.cancel_data();
|
let cancel_data = conn.cancel_data();
|
||||||
|
|
||||||
spawn(proc() {
|
spawn(move || {
|
||||||
timer::sleep(Duration::milliseconds(500));
|
timer::sleep(Duration::milliseconds(500));
|
||||||
assert!(postgres::cancel_query("postgres://postgres@localhost", &SslMode::None,
|
assert!(postgres::cancel_query("postgres://postgres@localhost", &SslMode::None,
|
||||||
cancel_data).is_ok());
|
cancel_data).is_ok());
|
||||||
|
Loading…
Reference in New Issue
Block a user