Skip to content

Commit 2a97c20

Browse files
committed
Clean up old test
1 parent 048e91a commit 2a97c20

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

tokio-postgres/tests/test/main.rs

-44
Original file line numberDiff line numberDiff line change
@@ -613,50 +613,6 @@ async fn query_portal() {
613613
}
614614

615615
/*
616-
#[test]
617-
fn query_portal() {
618-
let _ = env_logger::try_init();
619-
let mut runtime = Runtime::new().unwrap();
620-
621-
let (mut client, connection) = runtime.block_on(connect("user=postgres")).unwrap();
622-
let connection = connection.map_err(|e| panic!("{}", e));
623-
runtime.handle().spawn(connection).unwrap();
624-
625-
runtime
626-
.block_on(
627-
client
628-
.simple_query(
629-
"CREATE TEMPORARY TABLE foo (id SERIAL, name TEXT);
630-
INSERT INTO foo (name) VALUES ('alice'), ('bob'), ('charlie');
631-
BEGIN;",
632-
)
633-
.for_each(|_| Ok(())),
634-
)
635-
.unwrap();
636-
637-
let statement = runtime
638-
.block_on(client.prepare("SELECT id, name FROM foo ORDER BY id"))
639-
.unwrap();
640-
let portal = runtime.block_on(client.bind(&statement, &[])).unwrap();
641-
642-
let f1 = client.query_portal(&portal, 2).collect();
643-
let f2 = client.query_portal(&portal, 2).collect();
644-
let f3 = client.query_portal(&portal, 2).collect();
645-
let (r1, r2, r3) = runtime.block_on(f1.join3(f2, f3)).unwrap();
646-
647-
assert_eq!(r1.len(), 2);
648-
assert_eq!(r1[0].get::<_, i32>(0), 1);
649-
assert_eq!(r1[0].get::<_, &str>(1), "alice");
650-
assert_eq!(r1[1].get::<_, i32>(0), 2);
651-
assert_eq!(r1[1].get::<_, &str>(1), "bob");
652-
653-
assert_eq!(r2.len(), 1);
654-
assert_eq!(r2[0].get::<_, i32>(0), 3);
655-
assert_eq!(r2[0].get::<_, &str>(1), "charlie");
656-
657-
assert_eq!(r3.len(), 0);
658-
}
659-
660616
#[test]
661617
fn poll_idle_running() {
662618
struct DelayStream(Delay);

0 commit comments

Comments
 (0)