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
Search attributes from GetVersion is intended to affect OnUpsertSearchAttributes. OnUpsertSearchAttributes is intended to be called on any upsert search attribute, which includes GetVersion. We should clarify in the docs that OnUpsertSearchAttributes will be used used for GetVersion
When multiple GetVersion calls are present across different branches of a workflow, mocking each OnUpsertSearchAttributes becomes challenging due to the accumulation of all previous changeIDs in an unpredictable order.
Additionally, getChangeVersions is non-deterministic because it iterates over a map, and its result is used in the UpsertSearchAttributes call.
You shouldn't need to assert the exact value of changeID if you are not interested in it. You should be able to use something like MatchedBy to just match the key in the map.
Expected Behavior
Search attributes from
GetVersion
does not affectOnUpsertSearchAttributes
mockActual Behavior
Tests fail if
UpsertSearchAttributes
calls from versioning are not mocked explicitlySteps to Reproduce the Problem
GetVersion
andUpsertSearchAttribute
in your workflowenv.OnUpsertSearchAttribute
in a test to validate the arguments ofUpsertSearchAttributes
UpsertSearchAttributes
made fromGetVersion
The text was updated successfully, but these errors were encountered: