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
However recently I had to switch to CompleteActivityByID due to the fact that the activity token will get updated when the activity is rescheduled(because of scheduling timeout), and hence it would fail to find the activity when calling CompleteActivity with an outdated token later. While CompleteActivityByID relies only on workflowID and activityID and has no problem finding a rescheduled activity.
But there's no CompleteActivityByID in the testsuite environment. Is it possible to write a unit test similar to the above?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In the testsuite there's a
CompleteActivity
method from the test envhttps://github.com/uber-go/cadence-client/blob/1b4849be48832fedd78dc7d29510eded822a8e7c/internal/workflow_testsuite.go#L604
which I can use to test behaviour about pending and asynchronously completing activities, e.g.
However recently I had to switch to
CompleteActivityByID
due to the fact that the activity token will get updated when the activity is rescheduled(because of scheduling timeout), and hence it would fail to find the activity when calling CompleteActivity with an outdated token later. WhileCompleteActivityByID
relies only onworkflowID
andactivityID
and has no problem finding a rescheduled activity.But there's no
CompleteActivityByID
in the testsuite environment. Is it possible to write a unit test similar to the above?Beta Was this translation helpful? Give feedback.
All reactions