Hello. I am trying to write unit test for a workflow which waits on incoming signals. (basically a workflow select).
I am trying to follow the example here:
I get the deadline exceeded error when running or debugging (as soon as I hit select). I even try setTestTimeout to some huge value and it blows up right away.
Question, does the initial parameter ctx for each activity need to be included in the list of mock argument?
Looking at this further, seems my signals never got received by my workflow under test, it just dies panic as soon as I call selector.Select(ctx) inside the workflow
in debug console, I got this
suite.go:63: test panicked: Potential deadlock detected: workflow goroutine “root” didn’t yield for over a second. Maybe as select is blocking?
The “Potential deadlock detected: workflow goroutine “root” didn’t yield for over a second” error indicates that the workflow is probably spinning on something. It means that the workflow thread didn’t call some Temporal API for at least a second.