Skip to content

Commit

Permalink
[v054] fix WithNewStep finish time
Browse files Browse the repository at this point in the history
  • Loading branch information
koodeex committed Apr 12, 2022
1 parent 957c2e8 commit 0ceb432
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/framework/core/common/step_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ func (ctx *stepCtx) WithNewStep(stepName string, step func(ctx provider.StepCtx)
defer ctx.currentStep.WithChild(newCtx.CurrentStep())
defer func() {
r := recover()
newCtx.CurrentStep().Finish()
if r != nil {
ctxName := newCtx.ExecutionContextName()
errMsg := fmt.Sprintf("%s panicked: %v\n%s", ctxName, r, debug.Stack())
Expand Down
1 change: 1 addition & 0 deletions pkg/framework/core/common/steps.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ func (c *Common) WithNewStep(stepName string, step func(ctx provider.StepCtx), p
defer c.Step(stCtx.CurrentStep())
defer func() {
r := recover()
stCtx.CurrentStep().Finish()
if r != nil {
ctxName := c.ExecutionContext().GetName()
errMsg := fmt.Sprintf("%s panicked: %v\n%s", ctxName, r, debug.Stack())
Expand Down

0 comments on commit 0ceb432

Please sign in to comment.