Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixups of issues left from #1837 #1843

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

YohDeadfall
Copy link
Contributor

@YohDeadfall YohDeadfall commented Sep 6, 2024

Fixes issues left from #1837, but nothing critical.

The problem with unreachable! in tests is that it requires to have a non-empty expected in the #[should_panic] attribute. So we provide a message to verify that panicking happens for the right reason.

@YohDeadfall YohDeadfall changed the title fixups Fixups of issues left from #1837 Sep 6, 2024
@workingjubilee
Copy link
Member

should_panic(expected) should work normally, we specially handle it to make it do so. @YohDeadfall

@YohDeadfall
Copy link
Contributor Author

Ah, I see. It contains the desired output inside, but the message looks a bit cryptic:

note: panic did not contain expected string
      panic message: `"\n\nPostgres Messages:\n\u{1b}[37m\u{1b}[2m[2024-09-06 19:07:37.709 UTC] [515940] [66db52f9.7df64]: LOG:  starting PostgreSQL 16.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 14.2.1 20240805, 64-bit\n[2024-09-06 19:07:37.710 UTC] [515940] [66db52f9.7df64]: LOG:  listening on IPv6 address \"::1\", port 32216\n[2024-09-06 19:07:37.710 UTC] [515940] [66db52f9.7df64]: LOG:  listening on IPv4 address \"127.0.0.1\", port 32216\n[2024-09-06 19:07:37.715 UTC] [515940] [66db52f9.7df64]: LOG:  listening on Unix socket \"/home/yoh/src/pgrx/target/test-pgdata/.s.PGSQL.32216\"\n[2024-09-06 19:07:37.728 UTC] [515940] [66db52f9.7df64]: LOG:  database system is ready to accept connections\n\u{1b}[0m\u{1b}[39m\n\nTest Function Messages:\n\u{1b}[36m[2024-09-06 19:07:39.471 UTC] [518963] [66db52fb.7eb33]: LOG:  statement: BEGIN\n[2024-09-06 19:07:39.471 UTC] [518963] [66db52fb.7eb33]: LOG:  statement: SELECT \"tests\".\"test_cursor_prepared_statement_panics_more_args\"();\n[2024-09-06 19:07:39.474 UTC] [518963] [66db52fb.7eb33]: ERROR:  called `Result::unwrap()` on an `Err` value: PreparedStatementArgumentMismatch { expected: 1, got: 2 }\n[2024-09-06 19:07:39.474 UTC] [518963] [66db52fb.7eb33]: STATEMENT:  SELECT \"tests\".\"test_cursor_prepared_statement_panics_more_args\"();\n[2024-09-06 19:07:39.474 UTC] [518963] [66db52fb.7eb33]: LOG:  statement: ROLLBACK\n\u{1b}[39m\n\nClient Error:\n\u{1b}[31m\u{1b}[1mcalled `Result::unwrap()` on an `Err` value: PreparedStatementArgumentMismatch { expected: 1, got: 2 }\u{1b}[0m\u{1b}[39m\npostgres location: \u{1b}[37m\u{1b}[2mclient.rs\u{1b}[0m\u{1b}[39m\nrust location: \u{1b}[33m<unknown>\u{1b}[39m\n\n"`,
 expected substring: `"just checking it"`

@workingjubilee
Copy link
Member

...a bit cryptic indeed, yes.

@workingjubilee workingjubilee merged commit 922a43f into pgcentralfoundation:develop Sep 6, 2024
14 checks passed
@YohDeadfall YohDeadfall deleted the fixups branch September 6, 2024 22:10
eeeebbbbrrrr added a commit that referenced this pull request Sep 9, 2024
Welcome to pgrx v0.12.3. This point release upgrades to use the new
Postgres 17rc1.

As usual, please `cargo install cargo-pgrx --version 0.12.3 --locked`.
Then you can run `cargo pgrx upgrade` in your extension crate's root to
update its dependencies.


## What's Changed
* Fixups of issues left from #1837 by @YohDeadfall in
#1843
* move to Postgres v17rc1 by @eeeebbbbrrrr in
#1846


**Full Changelog**:
v0.12.2...v0.12.3
daamien pushed a commit to daamien/pgrx that referenced this pull request Sep 12, 2024
Welcome to pgrx v0.12.3. This point release upgrades to use the new
Postgres 17rc1.

As usual, please `cargo install cargo-pgrx --version 0.12.3 --locked`.
Then you can run `cargo pgrx upgrade` in your extension crate's root to
update its dependencies.


## What's Changed
* Fixups of issues left from pgcentralfoundation#1837 by @YohDeadfall in
pgcentralfoundation#1843
* move to Postgres v17rc1 by @eeeebbbbrrrr in
pgcentralfoundation#1846


**Full Changelog**:
pgcentralfoundation/pgrx@v0.12.2...v0.12.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants