Deadline exceeded error with flow with selector and GetWorkflowError()

To me this looks like a bug, but there may be an explanation for this behavior:
I have a workflow with some initial logic and then a selector to listen for channel messages.
I’m testing the workflow and asserting that no error occurred:


If the GetWorkflowError() is called, it causes a deadline exceeded error, which was very difficult to figure out. Is this expected behavior?

Can you show how you are sending the signal in your test?
Have seen these types of errors if you don’t use RegisterDelayedCallback, for example:

s.env.RegisterDelayedCallback(func() {
		s.env.SignalWorkflow("signal-name", "signal-value")
	}, time.Millisecond)

note the callback delay can be much longer than a millisecond

Thanks for the reply…the test is actually not sending a signal. The flow has a few activities that run at the beginning of the flow and then waits for signals to complete the remainder of the flow. This test was only verifying those initial activities and no signal was actually sent.
Do you see any problem with that?

Would help to see your test code, could you share all or parts of it as well as the entire error you got?

From your description it seems you are testing a workflow that at some point waits for signals forever (the workflow never completes).

Probably good to unit test your activity functions individually, and then have your workflow integration test with real/mocked activities separately.