SNOW-3264599: core + python - abort query method#750
Merged
sfc-gh-asolarski merged 1 commit intomainfrom Apr 13, 2026
Merged
Conversation
This was referenced Mar 27, 2026
Contributor
Author
b6a7467 to
1d29829
Compare
Comment on lines
+1841
to
+1858
| def test_abort_query_returns_true_on_success(self, cursor, mock_connection): | ||
| """abort_query sends correct RPC args and returns True on success.""" | ||
| mock_connection.db_api.connection_abort_query.return_value.success = True | ||
|
|
||
| result = cursor.abort_query("01234567-abcd-ef01-0000-000000000001") | ||
|
|
||
| assert result is True | ||
| request = mock_connection.db_api.connection_abort_query.call_args.args[0] | ||
| assert request.conn_handle == ConnectionHandle(id=1) | ||
| assert request.query_id == "01234567-abcd-ef01-0000-000000000001" | ||
|
|
||
| def test_abort_query_returns_false_on_failure(self, cursor, mock_connection): | ||
| """abort_query returns False when the server reports failure.""" | ||
| mock_connection.db_api.connection_abort_query.return_value.success = False | ||
|
|
||
| result = cursor.abort_query("some-qid") | ||
|
|
||
| assert result is False |
Contributor
There was a problem hiding this comment.
Does those tests really test the behavior? Imo we only test that connection_abort_query is called and proper value is returned
Contributor
Author
There was a problem hiding this comment.
The method is a thin delegation wrapper — constructing the request, forwarding it, and returning response.success is all it does. The unit test verifies that wiring (correct args, correct return value). Actual abort behavior is the responsibility of the backend/RPC layer and would be covered by integration tests.
sfc-gh-turbaszek
requested changes
Mar 30, 2026
1d29829 to
31bfc73
Compare
e6e3e39 to
9147ce6
Compare
9147ce6 to
5ee8d0c
Compare
31bfc73 to
8f9e571
Compare
Base automatically changed from
03-27-snow-3264599_core_python_-_query_result_fetching_by_sfqid
to
main
March 30, 2026 11:03
8f9e571 to
cdfb6d8
Compare
cdfb6d8 to
6807b72
Compare
sfc-gh-turbaszek
approved these changes
Apr 10, 2026
6807b72 to
0e0d9a7
Compare
e16fc35 to
76c4352
Compare
# Conflicts: # python/tests/integ/test_cursor.py
76c4352 to
44bfc9a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.