lidavidm commented on code in PR #4814:
URL: https://github.com/apache/arrow-adbc/pull/4814#discussion_r4595850020
##########
python/adbc_driver_flightsql/tests/test_errors.py:
##########
@@ -40,6 +40,11 @@ def assert_detail(e):
def test_query_cancel(test_dbapi):
with test_dbapi.cursor() as cur:
+ partitions, _ = cur.adbc_execute_partitions("SELECT 1")
+ cur.adbc_read_partition(partitions[0])
+ assert cur._results._cancel == test_dbapi.adbc_connection.cancel
+ assert cur.fetchone() == (5,)
Review Comment:
I'd rather not assert on internals, but if we have to do it, let's make it a
new test.
##########
python/adbc_driver_flightsql/tests/test_errors.py:
##########
@@ -40,6 +40,11 @@ def assert_detail(e):
def test_query_cancel(test_dbapi):
with test_dbapi.cursor() as cur:
+ partitions, _ = cur.adbc_execute_partitions("SELECT 1")
+ cur.adbc_read_partition(partitions[0])
+ assert cur._results._cancel == test_dbapi.adbc_connection.cancel
+ assert cur.fetchone() == (5,)
Review Comment:
I'd also want to ensure that executing another operation resets `_cancel`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]