Skip to content

Commit

Permalink
Yet another test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
v0idpwn committed Sep 13, 2023
1 parent 92f418e commit dc62076
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,11 @@ async fn test_lifecycle() {
assert_eq!(msg_ids.len(), 2);
assert_eq!(msg_ids[0].get::<i64, usize>(0), 1);
assert_eq!(msg_ids[1].get::<i64, usize>(0), 2);
let rowcount: i64 = sqlx::query_scalar(&format!("SELECT count(*) from pgmq_{batch_queue}"))
.fetch_one(&conn)
.await
.expect("failed to get rowcount");
let rowcount: i64 =
sqlx::query_scalar(&format!("SELECT count(*) from pgmq.queue_{batch_queue}"))
.fetch_one(&conn)
.await
.expect("failed to get rowcount");
assert_eq!(rowcount, 2);

let _ = sqlx::query("CREATE EXTENSION IF NOT EXISTS pg_partman")
Expand All @@ -149,7 +150,7 @@ async fn test_lifecycle() {

// CREATE with 5 seconds per partition, 10 seconds retention
let test_duration_queue = format!("test_duration_{test_num}");
let q = format!("SELECT \"pgmq.create_partitioned\"('{test_duration_queue}'::text, '5 seconds'::text, '10 seconds'::text);");
let q = format!("SELECT pgmq.create_partitioned('{test_duration_queue}'::text, '5 seconds'::text, '10 seconds'::text);");
let _ = sqlx::query(&q)
.execute(&conn)
.await
Expand All @@ -158,7 +159,7 @@ async fn test_lifecycle() {
// CREATE with 10 messages per partition, 20 messages retention
let test_numeric_queue = format!("test_numeric_{test_num}");
let _ = sqlx::query(&format!(
"SELECT \"pgmq.create_partitioned\"('{test_numeric_queue}'::text, '10'::text, '20'::text);"
"SELECT pgmq.create_partitioned('{test_numeric_queue}'::text, '10'::text, '20'::text);"
))
.execute(&conn)
.await
Expand Down

0 comments on commit dc62076

Please sign in to comment.