Skip to content

Strengthen NonExistentTable test to verify failure details#125

Merged
SeanTAllen merged 1 commit intomainfrom
sean/enhance-nonexistent-table-test-assertion
Feb 14, 2026
Merged

Strengthen NonExistentTable test to verify failure details#125
SeanTAllen merged 1 commit intomainfrom
sean/enhance-nonexistent-table-test-assertion

Conversation

@SeanTAllen
Copy link
Copy Markdown
Member

The _NonExistentTableQueryReceiver.pg_query_failed callback previously only checked query identity, ignoring the failure value entirely (there was a TODO to fix this). Now it also verifies that the failure is an ErrorResponseMessage with SQLSTATE 42P01 (undefined_table), catching any unexpected failure type or error code.

Also fixes a pre-existing typo ("paramter" → "parameter") in a failure message.

The test previously only checked query identity on failure, ignoring
the failure value entirely (there was a TODO to fix this). Now it
also verifies that the failure is an ErrorResponseMessage with
SQLSTATE 42P01 (undefined_table), catching any unexpected failure
type or error code.
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Feb 14, 2026
@SeanTAllen SeanTAllen merged commit b26d3d7 into main Feb 14, 2026
10 checks passed
@SeanTAllen SeanTAllen deleted the sean/enhance-nonexistent-table-test-assertion branch February 14, 2026 16:53
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Feb 14, 2026
SeanTAllen added a commit that referenced this pull request Feb 15, 2026
Streaming queries use the extended query protocol with Execute(max_rows)
to deliver results in windowed batches via PortalSuspended, rather than
buffering all rows in memory. The client controls flow through
fetch_more() and close_stream() on Session, receiving batches via
pg_stream_batch on StreamingResultReceiver.

Adds _StreamingQueryInFlight query sub-state with _completing and _error
guards to prevent duplicate Sync and post-completion Execute messages.
Dispatch for fetch_more/close_stream uses match on concrete type in
_SessionLoggedIn rather than the _QueryState interface.

Design: #125
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