Skip to content

Commit 717cac9

Browse files
committed
add a comment on heartbeater test logic
1 parent 4fc4804 commit 717cac9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/auto_heartbeater_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ func TestAutoHearbeater_Run(t *testing.T) {
4545
}
4646
)
4747

48+
// Run is a sync function that is spawned in a goroutine normally.
49+
// So instead of asserting the results we can verify that the function exists.
50+
4851
t.Run("worker stop channel", func(t *testing.T) {
4952
stopCh := make(chan struct{})
5053
invoker := &MockServiceInvoker{}
@@ -53,7 +56,7 @@ func TestAutoHearbeater_Run(t *testing.T) {
5356
hearbeater := newHeartbeater(stopCh, invoker, logger, clock, activityType, workflowExecution)
5457

5558
close(stopCh)
56-
59+
5760
hearbeater.Run(context.Background(), time.Second)
5861
})
5962
t.Run("context done", func(t *testing.T) {

0 commit comments

Comments
 (0)