Skip to content

SNOW-3264599: core + python - abort query method#750

Merged
sfc-gh-asolarski merged 1 commit intomainfrom
03-27-snow-3264599_core_python_-_abort_query_method
Apr 13, 2026
Merged

SNOW-3264599: core + python - abort query method#750
sfc-gh-asolarski merged 1 commit intomainfrom
03-27-snow-3264599_core_python_-_abort_query_method

Conversation

@sfc-gh-asolarski
Copy link
Copy Markdown
Contributor

No description provided.

@sfc-gh-asolarski sfc-gh-asolarski marked this pull request as ready for review March 27, 2026 15:06
@sfc-gh-asolarski sfc-gh-asolarski requested a review from a team as a code owner March 27, 2026 15:06
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-27-snow-3264599_core_python_-_abort_query_method branch from b6a7467 to 1d29829 Compare March 27, 2026 15:12
Comment thread python/src/snowflake/connector/cursor.py Outdated
Comment thread python/tests/integ/test_cursor.py Outdated
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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does those tests really test the behavior? Imo we only test that connection_abort_query is called and proper value is returned

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-asolarski sfc-gh-asolarski changed the base branch from 03-27-snow-3264599_core_python_-_query_result_fetching_by_sfqid to graphite-base/750 March 30, 2026 08:45
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-27-snow-3264599_core_python_-_abort_query_method branch from 1d29829 to 31bfc73 Compare March 30, 2026 08:46
@sfc-gh-asolarski sfc-gh-asolarski changed the base branch from graphite-base/750 to 03-27-snow-3264599_core_python_-_query_result_fetching_by_sfqid March 30, 2026 08:46
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-27-snow-3264599_core_python_-_query_result_fetching_by_sfqid branch from 9147ce6 to 5ee8d0c Compare March 30, 2026 09:57
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-27-snow-3264599_core_python_-_abort_query_method branch from 31bfc73 to 8f9e571 Compare March 30, 2026 09:57
Base automatically changed from 03-27-snow-3264599_core_python_-_query_result_fetching_by_sfqid to main March 30, 2026 11:03
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-27-snow-3264599_core_python_-_abort_query_method branch from 8f9e571 to cdfb6d8 Compare March 30, 2026 12:58
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-27-snow-3264599_core_python_-_abort_query_method branch from cdfb6d8 to 6807b72 Compare April 10, 2026 11:49
@sfc-gh-asolarski sfc-gh-asolarski added this pull request to the merge queue Apr 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 10, 2026
@sfc-gh-asolarski sfc-gh-asolarski added this pull request to the merge queue Apr 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 10, 2026
@sfc-gh-asolarski sfc-gh-asolarski added this pull request to the merge queue Apr 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 10, 2026
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-27-snow-3264599_core_python_-_abort_query_method branch from 6807b72 to 0e0d9a7 Compare April 13, 2026 08:05
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-27-snow-3264599_core_python_-_abort_query_method branch 2 times, most recently from e16fc35 to 76c4352 Compare April 13, 2026 10:01
@sfc-gh-asolarski sfc-gh-asolarski added this pull request to the merge queue Apr 13, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 13, 2026
@sfc-gh-asolarski sfc-gh-asolarski added this pull request to the merge queue Apr 13, 2026
# Conflicts:
#	python/tests/integ/test_cursor.py
@sfc-gh-asolarski sfc-gh-asolarski removed this pull request from the merge queue due to a manual request Apr 13, 2026
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-27-snow-3264599_core_python_-_abort_query_method branch from 76c4352 to 44bfc9a Compare April 13, 2026 11:19
@sfc-gh-asolarski sfc-gh-asolarski added this pull request to the merge queue Apr 13, 2026
Merged via the queue into main with commit 3953603 Apr 13, 2026
82 of 89 checks passed
@sfc-gh-asolarski sfc-gh-asolarski deleted the 03-27-snow-3264599_core_python_-_abort_query_method branch April 13, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants