Skip to content

Commit e3dfd36

Browse files
ensure non null operationHandle for commandId creation
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent 5afa733 commit e3dfd36

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/unit/test_thrift_backend.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,7 @@ def test_handle_execute_response_checks_operation_state_in_direct_results(self):
595595
resultSet=None,
596596
closeOperation=None,
597597
),
598+
operationHandle=self.operation_handle,
598599
)
599600
thrift_backend = ThriftDatabricksClient(
600601
"foobar",
@@ -753,6 +754,7 @@ def test_direct_results_uses_display_message_if_available(self, tcli_service_cla
753754
resultSet=None,
754755
closeOperation=None,
755756
),
757+
operationHandle=self.operation_handle,
756758
)
757759

758760
tcli_service_instance.ExecuteStatement.return_value = t_execute_resp
@@ -783,6 +785,7 @@ def test_handle_execute_response_checks_direct_results_for_error_statuses(self):
783785
resultSet=None,
784786
closeOperation=None,
785787
),
788+
operationHandle=self.operation_handle,
786789
)
787790

788791
resp_2 = resp_type(
@@ -795,6 +798,7 @@ def test_handle_execute_response_checks_direct_results_for_error_statuses(self):
795798
resultSet=None,
796799
closeOperation=None,
797800
),
801+
operationHandle=self.operation_handle,
798802
)
799803

800804
resp_3 = resp_type(
@@ -805,6 +809,7 @@ def test_handle_execute_response_checks_direct_results_for_error_statuses(self):
805809
resultSet=ttypes.TFetchResultsResp(status=self.bad_status),
806810
closeOperation=None,
807811
),
812+
operationHandle=self.operation_handle,
808813
)
809814

810815
resp_4 = resp_type(
@@ -815,6 +820,7 @@ def test_handle_execute_response_checks_direct_results_for_error_statuses(self):
815820
resultSet=None,
816821
closeOperation=ttypes.TCloseOperationResp(status=self.bad_status),
817822
),
823+
operationHandle=self.operation_handle,
818824
)
819825

820826
for error_resp in [resp_1, resp_2, resp_3, resp_4]:

0 commit comments

Comments
 (0)