Skip to content

Commit

Permalink
fix stub
Browse files Browse the repository at this point in the history
  • Loading branch information
Quinn-With-Two-Ns committed Oct 9, 2024
1 parent 1daf458 commit 18bde40
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,15 @@ public void respondWorkflowTaskFailureMetricTest() throws Exception {
eagerActivityDispatcher,
slotSupplier);

WorkflowServiceGrpc.WorkflowServiceFutureStub futureStub =
mock(WorkflowServiceGrpc.WorkflowServiceFutureStub.class);
when(futureStub.shutdownWorker(any(ShutdownWorkerRequest.class)))
.thenReturn(Futures.immediateFuture(ShutdownWorkerResponse.newBuilder().build()));

WorkflowServiceGrpc.WorkflowServiceBlockingStub blockingStub =
mock(WorkflowServiceGrpc.WorkflowServiceBlockingStub.class);
when(client.blockingStub()).thenReturn(blockingStub);
when(client.futureStub()).thenReturn(futureStub);
when(blockingStub.withOption(any(), any())).thenReturn(blockingStub);

PollWorkflowTaskQueueResponse pollResponse =
Expand Down

0 comments on commit 18bde40

Please sign in to comment.