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
func TestVisitPayloads_AggregationGroup(t *testing.T) {
// Due to us not visiting protos inside Any, this test used to fail
root := &workflowservice.CountWorkflowExecutionsResponse_AggregationGroup{GroupValues: []*common.Payload{{Data: []byte("orig-val")}}}
var count int
// Visit with any recursion enabled and only change orig-val
err := VisitPayloads(context.Background(), root, VisitPayloadsOptions{
Visitor: func(ctx *VisitPayloadsContext, p []*common.Payload) ([]*common.Payload, error) {
count += 1
// Only mutate if the payloads has orig-val
if len(p) == 1 && string(p[0].Data) == "orig-val" {
return []*common.Payload{{Data: []byte("new-val")}}, nil
}
return p, nil
},
})
require.NoError(t, err)
require.Equal(t, 1, count)
}
Actual Behavior
Test is failing due to Payload not being visited.
Steps to Reproduce the Problem
Specifications
Version:
Platform:
The text was updated successfully, but these errors were encountered:
Expected Behavior
Visitor should visit this
repeated temporal.api.common.v1.Payload
https://github.com/temporalio/api/blob/9156239c8272003b6f228951602ca2b130a55876/temporal/api/workflowservice/v1/request_response.proto#L938This test should pass
Actual Behavior
Test is failing due to Payload not being visited.
Steps to Reproduce the Problem
Specifications
The text was updated successfully, but these errors were encountered: