You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes the test fails with io.temporal.client.WorkflowNotFoundException. Changing Workflow.await(condition) to Workflow.await(Duration.ofSeconds(100), condition) in TestWorkflowImpl seems to fix the problem, but not sure why.
Attached are the TRACE logs for io.temporal for when the issue reproduces: bug.log
Confirm the issue. It's related to the peculiarities of time skipping, how it's implemented, and an absence of total order between some operations in Temporal.
When you create a load, the client code doesn't stop time skipping soon enough and the time gets advanced A LOT to the workflow task timeout which completed the workflow and doesn't allow the signal to pass through. And there is no way for the server to make sure that the code that is supposed to be executed by the client after a long poll is returned is actually finished executing.
The fix here is not trivial. It's also related only to the test framework and not the core functionality.
I will think about the best fix here, but I have to temporarily deprioritize it behind some other tasks affecting an actual production functionality.
Thank you! Could you confirm if the suggested workaround should work? If I change Workflow.await(condition) to Workflow.await(timeout, condition), the issue seems to stop reproducing at least locally. Is this a reliable workaround?
No, it's not. The same "bug" or... limitation will trigger your Workflow.await(timeout, condition) earlier than you expect it, like its triggering workflow timeout now. I think the only gentle workaround here is not to set Workflow Timeout of any kind or don't use time skipping for such a test.
Expected Behavior
The unit test below should always pass
Actual Behavior
Sometimes the test fails with io.temporal.client.WorkflowNotFoundException. Changing
Workflow.await(condition)
toWorkflow.await(Duration.ofSeconds(100), condition)
inTestWorkflowImpl
seems to fix the problem, but not sure why.Attached are the TRACE logs for io.temporal for when the issue reproduces: bug.log
Steps to Reproduce the Problem
Run the following test:
Specifications
The text was updated successfully, but these errors were encountered: