Skip to content

Commit

Permalink
Merge branch 'master' into history-decision-handler-handlertaskstarted
Browse files Browse the repository at this point in the history
  • Loading branch information
ketsiambaku authored Apr 12, 2024
2 parents 8917670 + 5b27da0 commit 05ac24a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions service/history/execution/mutable_state_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -4819,7 +4819,7 @@ func (e *mutableStateBuilder) unixNanoToTime(
}

func (e *mutableStateBuilder) logInfo(msg string, tags ...tag.Tag) {
if e != nil {
if e == nil {
return
}
if e.executionInfo != nil {
Expand All @@ -4831,7 +4831,7 @@ func (e *mutableStateBuilder) logInfo(msg string, tags ...tag.Tag) {
}

func (e *mutableStateBuilder) logWarn(msg string, tags ...tag.Tag) {
if e != nil {
if e == nil {
return
}
if e.executionInfo != nil {
Expand All @@ -4843,7 +4843,7 @@ func (e *mutableStateBuilder) logWarn(msg string, tags ...tag.Tag) {
}

func (e *mutableStateBuilder) logError(msg string, tags ...tag.Tag) {
if e != nil {
if e == nil {
return
}
if e.executionInfo != nil {
Expand Down
8 changes: 8 additions & 0 deletions service/history/execution/mutable_state_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1864,3 +1864,11 @@ func TestAssignEventIDToBufferedEvents(t *testing.T) {
})
}
}

// This is only for passing the coverage
func TestLog(t *testing.T) {
var e *mutableStateBuilder
assert.NotPanics(t, func() { e.logInfo("a") })
assert.NotPanics(t, func() { e.logWarn("a") })
assert.NotPanics(t, func() { e.logError("a") })
}

0 comments on commit 05ac24a

Please sign in to comment.