Beispiel #1
0
 def test_session_already_exists_error(self):
     response = cadence_thrift.WorkflowService.StartWorkflowExecution.response(
         sessionAlreadyExistError=self.sessionAlreadyExistError)
     error = find_error(response)
     self.assertIsInstance(error, WorkflowExecutionAlreadyStartedError)
     self.assertEqual("ERROR", error.message)
     self.assertEqual("REQUEST-ID", error.start_request_id)
     self.assertEqual("RUN-ID", error.run_id)
 def call_return(self, method_name: str, request: object,
                 expected_return_type: type) -> Tuple[object, object]:
     response = self.thrift_call(method_name, request)
     if not response.success:
         return None, find_error(response)
     return_value = copy_thrift_to_py(response.success)
     assert isinstance(return_value, expected_return_type)
     return return_value, None
 def call_void(self, method_name, request):
     response = self.thrift_call(method_name, request)
     error = find_error(response)
     return None, error
Beispiel #4
0
 def test_internal_server_error(self):
     response = cadence_thrift.WorkflowService.StartWorkflowExecution.response(
         internalServiceError=self.internalServiceError)
     error = find_error(response)
     self.assertIsInstance(error, InternalServiceError)
     self.assertEqual("ERROR", error.message)