Skip to content

Commit ea9d456

Browse files
fix int test types
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent 0da04a6 commit ea9d456

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

src/databricks/sql/backend/thrift_backend.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -867,9 +867,7 @@ def get_execution_result(
867867
ssl_options=self._ssl_options,
868868
)
869869

870-
status = CommandState.from_thrift_state(resp.status)
871-
if status is None:
872-
raise ValueError(f"Invalid operation state: {resp.status}")
870+
status = self.get_query_state(command_id)
873871

874872
execute_response = ExecuteResponse(
875873
command_id=command_id,

tests/e2e/common/retry_test_mixins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ def test_retry_abort_close_operation_on_404(self, caplog):
326326
with self.connection(extra_params={**self._retry_policy}) as conn:
327327
with conn.cursor() as curs:
328328
with patch(
329-
"databricks.sql.utils.ExecuteResponse.has_been_closed_server_side",
329+
"databricks.sql.backend.types.ExecuteResponse.has_been_closed_server_side",
330330
new_callable=PropertyMock,
331331
return_value=False,
332332
):

tests/e2e/test_driver.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -933,12 +933,12 @@ def test_result_set_close(self):
933933
result_set = cursor.active_result_set
934934
assert result_set is not None
935935

936-
initial_op_state = result_set.op_state
936+
initial_op_state = result_set.status
937937

938938
result_set.close()
939939

940-
assert result_set.op_state == CommandState.CLOSED
941-
assert result_set.op_state != initial_op_state
940+
assert result_set.status == CommandState.CLOSED
941+
assert result_set.status != initial_op_state
942942

943943
# Closing the result set again should be a no-op and not raise exceptions
944944
result_set.close()

0 commit comments

Comments
 (0)