@@ -1074,24 +1074,28 @@ public void GetWorkflowExecutionHistoryWithTimeout(
1074
1074
AsyncMethodCallback resultHandler ,
1075
1075
Long timeoutInMillis )
1076
1076
throws TException {
1077
- // TODO test
1078
- ListenableFuture <com .uber .cadence .api .v1 .GetWorkflowExecutionHistoryResponse > resultFuture =
1079
- grpcServiceStubs
1080
- .workflowFutureStub ()
1081
- .withDeadline (Deadline .after (timeoutInMillis , TimeUnit .MILLISECONDS ))
1082
- .getWorkflowExecutionHistory (
1083
- RequestMapper .getWorkflowExecutionHistoryRequest (getRequest ));
1084
- resultFuture .addListener (
1085
- () -> {
1086
- try {
1087
- com .uber .cadence .api .v1 .GetWorkflowExecutionHistoryResponse response =
1088
- resultFuture .get ();
1089
- resultHandler .onComplete (ResponseMapper .getWorkflowExecutionHistoryResponse (response ));
1090
- } catch (Exception e ) {
1091
- resultHandler .onError (e );
1092
- }
1093
- },
1094
- ForkJoinPool .commonPool ());
1077
+ try {
1078
+ ListenableFuture <com .uber .cadence .api .v1 .GetWorkflowExecutionHistoryResponse > resultFuture =
1079
+ grpcServiceStubs
1080
+ .workflowFutureStub ()
1081
+ .withDeadline (Deadline .after (timeoutInMillis , TimeUnit .MILLISECONDS ))
1082
+ .getWorkflowExecutionHistory (
1083
+ RequestMapper .getWorkflowExecutionHistoryRequest (getRequest ));
1084
+ resultFuture .addListener (
1085
+ () -> {
1086
+ try {
1087
+ com .uber .cadence .api .v1 .GetWorkflowExecutionHistoryResponse response =
1088
+ resultFuture .get ();
1089
+ resultHandler
1090
+ .onComplete (ResponseMapper .getWorkflowExecutionHistoryResponse (response ));
1091
+ } catch (Exception e ) {
1092
+ resultHandler .onError (e );
1093
+ }
1094
+ },
1095
+ ForkJoinPool .commonPool ());
1096
+ } catch (StatusRuntimeException e ) {
1097
+ throw ErrorMapper .Error (e );
1098
+ }
1095
1099
}
1096
1100
1097
1101
@ Override
0 commit comments