Skip to content

Commit

Permalink
[Scanner] Use CurrentExecution instead of base one (cadence-workflow#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mkolodezny authored Jul 31, 2020
1 parent 121ef1e commit 42444dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions common/reconciliation/common/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ func ExecutionOpen(execution interface{}) bool {
// getExecution returns base Execution
func getExecution(execution interface{}) *Execution {
switch e := execution.(type) {
case *Execution:
return e
case *CurrentExecution:
return &e.Execution
case *ConcreteExecution:
return &e.Execution
default:
Expand Down
2 changes: 1 addition & 1 deletion common/reconciliation/common/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ func (s *UtilSuite) TestDeleteExecution() {
execManager.On("DeleteCurrentWorkflowExecution", mock.Anything).Return(tc.deleteCurrentErr).Once()
}
pr := NewPersistenceRetryer(execManager, nil)
result := DeleteExecution(&Execution{}, pr)
result := DeleteExecution(&ConcreteExecution{}, pr)
s.Equal(tc.expectedFixResult, result)
}
}
Expand Down

0 comments on commit 42444dc

Please sign in to comment.