Skip to content

Commit

Permalink
Fix the unit test when feature is disabled (#2386)
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-xie committed Jul 16, 2022
1 parent e35874a commit b7bfaea
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions service/history/task/transfer_standby_task_executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -787,11 +787,13 @@ func (s *transferStandbyTaskExecutorSuite) TestProcessRecordWorkflowStartedTask(
persistenceMutableState, err := test.CreatePersistenceMutableState(mutableState, startEvent.ID, startEvent.Version)
s.NoError(err)
s.mockExecutionMgr.On("GetWorkflowExecution", mock.Anything, mock.Anything).Return(&persistence.GetWorkflowExecutionResponse{State: persistenceMutableState}, nil)
s.mockVisibilityMgr.On(
"RecordWorkflowExecutionUninitialized",
mock.Anything,
createRecordWorkflowExecutionUninitializedRequest(transferTask, mutableState),
).Once().Return(nil)
if s.mockShard.GetConfig().EnableRecordWorkflowExecutionUninitialized() {
s.mockVisibilityMgr.On(
"RecordWorkflowExecutionUninitialized",
mock.Anything,
createRecordWorkflowExecutionUninitializedRequest(transferTask, mutableState),
).Once().Return(nil)
}
s.mockVisibilityMgr.On(
"RecordWorkflowExecutionStarted",
mock.Anything,
Expand Down

0 comments on commit b7bfaea

Please sign in to comment.