From 42444dc0da9d5e2ed5f5e0be833d66533199882e Mon Sep 17 00:00:00 2001 From: Max K <25259015+mkolodezny@users.noreply.github.com> Date: Fri, 31 Jul 2020 11:37:57 -0700 Subject: [PATCH] [Scanner] Use CurrentExecution instead of base one (#3421) --- common/reconciliation/common/util.go | 4 ++-- common/reconciliation/common/util_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/reconciliation/common/util.go b/common/reconciliation/common/util.go index 24ddf18fe05..168504c14ff 100644 --- a/common/reconciliation/common/util.go +++ b/common/reconciliation/common/util.go @@ -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: diff --git a/common/reconciliation/common/util_test.go b/common/reconciliation/common/util_test.go index b5509ecc471..db383c9fb63 100644 --- a/common/reconciliation/common/util_test.go +++ b/common/reconciliation/common/util_test.go @@ -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) } }