-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
For test case sending multiple same signal at the same time; it detects unhandled signal
env.SignalWorkflow("signal-receive-with-timeout", &message)
env.SignalWorkflow("signal-receive-with-timeout-clone", &message)
env.SignalWorkflow("signal-receive-with-timeout", &message)
env.SignalWorkflow("signal-receive-with-timeout", &message)
The newer SDK also have selector.HasPending but not sure if that is useful in this scenario
Maybe something like below:
selector.AddFuture(
timer,
func(f workflow.Future) {
if err := f.Get(ctx, nil); err != nil && temporal.IsCanceledError(err) {
fmt.Println("WORKFLOW CANCELED!!!!!")
isCancelled = true
} else {
fmt.Println("TIMED OUT!!!")
hasTimedOut = true
}
},
)
selector.AddReceive(
sigCh,
func(c workflow.ReceiveChannel, more bool) {
// This handles multiple signals of same type
for c.ReceiveAsync(valuePtr) {
fmt.Println("MORE SIGNALS!!!")
}
},
)
Metadata
Metadata
Assignees
Labels
No labels