Skip to content

Commit

Permalink
Fix build (#2827)
Browse files Browse the repository at this point in the history
  • Loading branch information
yiminc committed May 10, 2022
1 parent 5da9b57 commit 256560c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion service/history/transferQueueStandbyTaskExecutor.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ func (t *transferQueueStandbyTaskExecutor) processStartChildExecution(
switch err.(type) {
case nil, *serviceerror.NamespaceNotFound:
return nil, nil
case *serviceerrors.WorkflowNotReady:
case *serviceerror.WorkflowNotReady:
return &startChildExecutionPostActionInfo{}, nil
default:
return nil, err
Expand Down
4 changes: 2 additions & 2 deletions service/history/transferQueueStandbyTaskExecutor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1102,12 +1102,12 @@ func (s *transferQueueStandbyTaskExecutorSuite) TestProcessStartChildExecution_P
persistenceMutableState = s.createPersistenceMutableState(mutableState, event.GetEventId(), event.GetVersion())
s.mockShard.SetCurrentTime(s.clusterName, now.Add(s.fetchHistoryDuration))
s.mockExecutionMgr.EXPECT().GetWorkflowExecution(gomock.Any(), gomock.Any()).Return(&persistence.GetWorkflowExecutionResponse{State: persistenceMutableState}, nil)
s.mockHistoryClient.EXPECT().VerifyFirstWorkflowTaskScheduled(gomock.Any(), gomock.Any()).Return(nil, &serviceerrors.WorkflowNotReady{})
s.mockHistoryClient.EXPECT().VerifyFirstWorkflowTaskScheduled(gomock.Any(), gomock.Any()).Return(nil, &serviceerror.WorkflowNotReady{})
err = s.transferQueueStandbyTaskExecutor.Execute(context.Background(), s.newTaskExecutable(transferTask))
s.Equal(consts.ErrTaskRetry, err)

s.mockShard.SetCurrentTime(s.clusterName, now.Add(s.discardDuration))
s.mockHistoryClient.EXPECT().VerifyFirstWorkflowTaskScheduled(gomock.Any(), gomock.Any()).Return(nil, &serviceerrors.WorkflowNotReady{})
s.mockHistoryClient.EXPECT().VerifyFirstWorkflowTaskScheduled(gomock.Any(), gomock.Any()).Return(nil, &serviceerror.WorkflowNotReady{})
err = s.transferQueueStandbyTaskExecutor.Execute(context.Background(), s.newTaskExecutable(transferTask))
s.Equal(consts.ErrTaskDiscarded, err)

Expand Down
5 changes: 2 additions & 3 deletions service/history/workflowTaskHandlerCallbacks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ import (
"go.temporal.io/server/common/payloads"
"go.temporal.io/server/common/persistence"
"go.temporal.io/server/common/searchattribute"
serviceerrors "go.temporal.io/server/common/serviceerror"
"go.temporal.io/server/service/history/api"
"go.temporal.io/server/service/history/events"
"go.temporal.io/server/service/history/shard"
Expand Down Expand Up @@ -149,7 +148,7 @@ func (s *WorkflowTaskHandlerCallbackSuite) TestVerifyFirstWorkflowTaskScheduled_
s.mockExecutionMgr.EXPECT().GetWorkflowExecution(gomock.Any(), gomock.Any()).Return(nil, &serviceerror.NotFound{})

err := s.workflowTaskHandlerCallback.verifyFirstWorkflowTaskScheduled(context.Background(), request)
s.IsType(&serviceerrors.WorkflowNotReady{}, err)
s.IsType(&serviceerror.WorkflowNotReady{}, err)
}

func (s *WorkflowTaskHandlerCallbackSuite) TestVerifyFirstWorkflowTaskScheduled_WorkflowCompleted() {
Expand Down Expand Up @@ -207,7 +206,7 @@ func (s *WorkflowTaskHandlerCallbackSuite) TestVerifyFirstWorkflowTaskScheduled_
s.mockExecutionMgr.EXPECT().GetWorkflowExecution(gomock.Any(), gomock.Any()).Return(gwmsResponse, nil)

err := s.workflowTaskHandlerCallback.verifyFirstWorkflowTaskScheduled(context.Background(), request)
s.IsType(&serviceerrors.WorkflowNotReady{}, err)
s.IsType(&serviceerror.WorkflowNotReady{}, err)
}

func (s *WorkflowTaskHandlerCallbackSuite) TestVerifyFirstWorkflowTaskScheduled_WorkflowRunning_TaskPending() {
Expand Down

0 comments on commit 256560c

Please sign in to comment.