From 3e4fc9895cf392617685fc40bc69de7890e9c4ad Mon Sep 17 00:00:00 2001 From: Andrew Yuan Date: Wed, 23 Apr 2025 15:35:17 -0700 Subject: [PATCH 1/2] Enable section of test that is now supported --- proxy/interceptor_test.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/proxy/interceptor_test.go b/proxy/interceptor_test.go index 517936a2..6db69b8e 100644 --- a/proxy/interceptor_test.go +++ b/proxy/interceptor_test.go @@ -498,9 +498,7 @@ func TestClientInterceptorGrpcFailures(t *testing.T) { // We expect that even though an error is returned, the Payload visitor visited the payload // included in the GRPC error details require.Error(err) - // TODO: https://github.com/temporalio/sdk-go/issues/1864 - // This check should be switched to True once the issue above is closed - require.False(proto.Equal(inputs.Payloads[0], inboundPayload)) + require.True(proto.Equal(inputs.Payloads[0], inboundPayload)) stat, ok := status.FromError(err) require.True(ok) for _, detail := range stat.Details() { @@ -509,13 +507,12 @@ func TestClientInterceptorGrpcFailures(t *testing.T) { multiOpFailure := &errordetails.MultiOperationExecutionFailure{} err = detailAny.UnmarshalTo(multiOpFailure) require.NoError(err) - payload := &common.Payload{} - err = multiOpFailure.Statuses[0].Details[0].UnmarshalTo(payload) + payloads := &common.Payloads{} + err = multiOpFailure.Statuses[0].Details[0].UnmarshalTo(payloads) require.NoError(err) newPayload := &common.Payload{Data: []byte("new-val")} - // This check should be switched to True once the issue above is closed - require.False(proto.Equal(newPayload, multiOpFailure.Statuses[0].Details[0])) + require.True(proto.Equal(payloads.Payloads[0], newPayload)) } _, err = client.QueryWorkflow(context.Background(), &workflowservice.QueryWorkflowRequest{}) From 50193325b6a5c6f0058c4017ebe119e00b30e38d Mon Sep 17 00:00:00 2001 From: Andrew Yuan Date: Wed, 23 Apr 2025 15:40:51 -0700 Subject: [PATCH 2/2] Forgot a change --- proxy/interceptor_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/interceptor_test.go b/proxy/interceptor_test.go index 6db69b8e..08c80c03 100644 --- a/proxy/interceptor_test.go +++ b/proxy/interceptor_test.go @@ -615,7 +615,7 @@ func (t *testGRPCServer) PollActivityTaskQueue( func (t *testGRPCServer) ExecuteMultiOperation( ctx context.Context, req *workflowservice.ExecuteMultiOperationRequest) (*workflowservice.ExecuteMultiOperationResponse, error) { - anyDetail, err := anypb.New(inputPayload()) + anyDetail, err := anypb.New(inputPayloads()) if err != nil { return nil, err }