Skip to content

Commit 38956b4

Browse files
committed
this is a little more clear for spi_tests::test_open_multiple_tuptables
1 parent 7bdb794 commit 38956b4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pgx-tests/src/tests/spi_tests.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -307,17 +307,16 @@ mod tests {
307307
}
308308

309309
#[pg_test]
310-
fn test_open_multiple_tuptables() -> Result<(), pgx::spi::Error> {
310+
fn test_open_multiple_tuptables() {
311311
// Regression test to ensure a new `SpiTupTable` instance does not override the
312312
// effective length of an already open one due to misuse of Spi statics
313-
Spi::connect(|client| {
313+
Spi::execute(|client| {
314314
let a = client.select("SELECT 1", None, None).first();
315315
let _b = client.select("SELECT 1 WHERE 'f'", None, None);
316316
assert!(!a.is_empty());
317317
assert_eq!(1, a.len());
318318
assert!(a.get_heap_tuple().is_some());
319-
assert_eq!(Some(1), a.get_datum::<i32>(1)?);
320-
Ok(())
319+
assert_eq!(Ok(Some(1)), a.get_datum::<i32>(1));
321320
})
322321
}
323322

0 commit comments

Comments
 (0)