Skip to content

Commit 82d3f43

Browse files
authored
Merge branch 'main' into bump-ui
2 parents 41c9ea7 + 61044f2 commit 82d3f43

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

internal/temporalcli/commands_test.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -509,10 +509,10 @@ type DevWorkerOptions struct {
509509
NexusServices []*nexus.Service
510510
}
511511

512-
// Simply a stub for client use
512+
// A stub for client use
513513
func DevWorkflow(workflow.Context, any) (any, error) { panic("Unreachable") }
514514

515-
// Simply a stub for client use
515+
// A stub for client use
516516
func DevActivity(context.Context, any) (any, error) { panic("Unreachable") }
517517

518518
// Stops when harness closes.
@@ -550,7 +550,9 @@ func (d *DevWorker) Stop() {
550550
d.Worker.Stop()
551551
}
552552

553-
// Default is just to return DevActivity result
553+
// OnDevWorkflow sets the callback invoked by the pre-registered "DevWorkflow" on this worker,
554+
// letting a test supply workflow behavior without registering a new workflow type. If unset,
555+
// DevWorkflow executes DevActivity and returns its result.
554556
func (d *DevWorker) OnDevWorkflow(fn func(workflow.Context, any) (any, error)) {
555557
d.devOpsLock.Lock()
556558
defer d.devOpsLock.Unlock()
@@ -563,7 +565,9 @@ func (d *DevWorker) DevWorkflowLastInput() any {
563565
return d.devWorkflowLastInput
564566
}
565567

566-
// Default is just to return result
568+
// OnDevActivity sets the callback invoked by the pre-registered DevActivity on this worker, letting
569+
// a test supply activity behavior without registering a new activity. If unset, DevActivity echoes
570+
// its input back as the result.
567571
func (d *DevWorker) OnDevActivity(fn func(context.Context, any) (any, error)) {
568572
d.devOpsLock.Lock()
569573
defer d.devOpsLock.Unlock()

0 commit comments

Comments
 (0)